Pagini recente » Cod sursa (job #122014) | Cod sursa (job #1406412) | Cod sursa (job #3205451) | Cod sursa (job #745021) | Cod sursa (job #2437673)
#include <stdio.h>
#define mod 1999999973
#define lld long long
lld power(lld x, lld y) {
lld res = 1;
x = x % mod;
while (y) {
if (y & 1) {
res = (res * x) % mod;
}
y >>= 1;
x = (x * x) % mod;
}
return res;
}
int main() {
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
lld x, p;
scanf("%lld%lld", &x, &p);
printf("%lld\n", power(x, p));
return 0;
}