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 | |
| parent | ed30499f7213c756c75527673dd9dbcc1bf059b5 (diff) | |
| download | competitive-programming-8ad882a1deea1ae012c6acf8810e3de9babca9f4.tar.xz competitive-programming-8ad882a1deea1ae012c6acf8810e3de9babca9f4.zip | |
solved 3 problems from cses
Diffstat (limited to 'cses/BitStrings')
| -rwxr-xr-x | cses/BitStrings/main | bin | 0 -> 22544 bytes | |||
| -rw-r--r-- | cses/BitStrings/main.cpp | 16 | ||||
| -rw-r--r-- | cses/BitStrings/main_input0.txt | 1 | ||||
| -rw-r--r-- | cses/BitStrings/main_output0.txt | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/cses/BitStrings/main b/cses/BitStrings/main Binary files differnew file mode 100755 index 0000000..177fec4 --- /dev/null +++ b/cses/BitStrings/main 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'; +} diff --git a/cses/BitStrings/main_input0.txt b/cses/BitStrings/main_input0.txt new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/cses/BitStrings/main_input0.txt @@ -0,0 +1 @@ +3 diff --git a/cses/BitStrings/main_output0.txt b/cses/BitStrings/main_output0.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/cses/BitStrings/main_output0.txt @@ -0,0 +1 @@ +8 |
