Pagini recente » Cod sursa (job #2911922) | Cod sursa (job #2789109) | Cod sursa (job #3185692) | Cod sursa (job #1673632) | Cod sursa (job #3259794)
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1999999973;
long long expPow(long long x, long long y) {
if (y == 0) {
return 1;
}
if (y % 2) {
return (x * expPow((x * x) % MOD, y / 2)) % MOD;
}
return expPow((x * x) % MOD, y / 2);
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
long long x, y;
cin >> x >> y;
cout << expPow(x, y);
return 0;
}