diff options
Diffstat (limited to '01_introductory_problems/bit_strings_1617.cpp')
| -rw-r--r-- | 01_introductory_problems/bit_strings_1617.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/01_introductory_problems/bit_strings_1617.cpp b/01_introductory_problems/bit_strings_1617.cpp new file mode 100644 index 0000000..6be46ac --- /dev/null +++ b/01_introductory_problems/bit_strings_1617.cpp | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #include <iostream> | ||
| 2 | |||
| 3 | int main() { | ||
| 4 | constexpr long long M = 1e9+7; | ||
| 5 | long long n, a{1}; | ||
| 6 | std::cin >> n; | ||
| 7 | while (--n >= 0) | ||
| 8 | a = (a * 2) % M; | ||
| 9 | std::cout << a << std::endl; | ||
| 10 | } | ||
