Pagini recente » Cod sursa (job #1237954) | Cod sursa (job #1341349) | Cod sursa (job #2763852) | Cod sursa (job #331753) | Cod sursa (job #1936440)
#include <cstdio>
using namespace std;
const long long MOD = 1999999973;
long long n, m;
void citire()
{
scanf("%lld %lld", &n, &m);
}
long long putere(long long x, long long y)
{
if(y == 0)
{
return 1;
}
if(y == 1)
{
return x;
}
else
{
if(y % 2 == 0)
{
return putere((x * x % MOD), y / 2) % MOD;
}
else
{
return x * (putere(x * x % MOD, y / 2) % MOD);
}
}
}
int main()
{
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
citire();
printf("%lld", putere(n, m));
}