0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 02:38:49 +00:00

P5035 金坷垃

R58861600
This commit is contained in:
Baoshuo Ren 2021-10-01 17:29:41 +08:00 committed by Baoshuo Ren
parent d44cea0747
commit e9464143da
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,24 @@
#include <bits/stdc++.h>
using namespace std;
const int mod = 123456789;
long long k;
long long binpow(long long a, long long b) {
long long res = 1;
a %= mod;
while (b) {
if (b & 1) res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
return res % mod;
}
int main() {
cin >> k;
cout << binpow(2, k - 1) << endl;
return 0;
}