0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 07:18:48 +00:00
OI-codes/Luogu/P5035/P5035.cpp

25 lines
382 B
C++

#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;
}