7 more
This commit is contained in:
19
CSES - CSES Problem Set/Bit_Strings.cpp
Normal file
19
CSES - CSES Problem Set/Bit_Strings.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// Bit Strings
|
||||
|
||||
#include<bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
using ll = long long;
|
||||
ll MOD = 1e9 + 7;
|
||||
|
||||
int main() {
|
||||
int n; cin >> n;
|
||||
ll ans = 1;
|
||||
for (int i{}; i < n; i++) {
|
||||
ans *= 2;
|
||||
ans %= MOD;
|
||||
}
|
||||
ans %= MOD;
|
||||
cout << ans;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user