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:
parent
d44cea0747
commit
e9464143da
24
Luogu/problem/P5035/P5035.cpp
Normal file
24
Luogu/problem/P5035/P5035.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user