Pagini recente » Cod sursa (job #569750) | Cod sursa (job #485114) | Cod sursa (job #555122) | Cod sursa (job #512159) | Cod sursa (job #2151393)
#include <cstdio>
using namespace std;
typedef long long LL;
const int MOD = 1999999973;
LL logPow(LL x, LL p) {
LL ans = 1;
while (p) {
if ((p >>= 1) & 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;
}