Pagini recente » Cod sursa (job #2573015) | Cod sursa (job #266552) | Cod sursa (job #2388534) | Cod sursa (job #2094618) | Cod sursa (job #2928889)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const long long abc = 1999999973;
long long binpow(long long a, long long b, long long m) {
a %= m;
long long res = 1;
while(b > 0) {
if(b & 1) {
res = res * a % m;
}
a = a * a % m;
b >>= 1;
}
return res;
}
int main() {
ios_base::sync_with_stdio(false);
fin.tie(0);
fout.tie(0);
int a, b; fin >> a >> b;
fout << binpow(a, b, abc);
return 0;
}