Pagini recente » Cod sursa (job #591221) | Cod sursa (job #2713726) | Cod sursa (job #2106573) | Cod sursa (job #32496) | Cod sursa (job #2151395)
#include <cstdio>
using namespace std;
typedef long long LL;
const int MOD = 1999999973;
LL logPow(LL x, LL p) {
LL ans;
for (ans = 1; p; p >>= 1) {
if (p & 1) ans = (ans * x) % MOD;
x = (x * x) % MOD;
}
return ans;
}
int main()
{
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
LL a, b;
scanf("%lld %lld ", &a, &b);
printf("%lld\n", logPow(a % MOD, b));
return 0;
}