diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-11-02 11:50:58 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-11-02 11:50:58 +0200 |
| commit | 8ad882a1deea1ae012c6acf8810e3de9babca9f4 (patch) | |
| tree | b063177175302e0e9daf6eccb5c9ff27c4d801f2 /cses/BitStrings/main.cpp | |
| parent | ed30499f7213c756c75527673dd9dbcc1bf059b5 (diff) | |
| download | competitive-programming-8ad882a1deea1ae012c6acf8810e3de9babca9f4.tar.xz competitive-programming-8ad882a1deea1ae012c6acf8810e3de9babca9f4.zip | |
solved 3 problems from cses
Diffstat (limited to 'cses/BitStrings/main.cpp')
| -rw-r--r-- | cses/BitStrings/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cses/BitStrings/main.cpp b/cses/BitStrings/main.cpp new file mode 100644 index 0000000..db812c5 --- /dev/null +++ b/cses/BitStrings/main.cpp @@ -0,0 +1,16 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int n; + int m = 1e9 + 7; + cin >> n; + long long ans = 0; + while(n--) { + ans += ((2 % m) * (2 % m)) % m; + } + cout << ans << '\n'; +} |
