Pagini recente » Cod sursa (job #3168488) | Cod sursa (job #795192) | Cod sursa (job #470619) | Cod sursa (job #1427463) | Cod sursa (job #1554437)
#include <iostream>
#include <cstdio>
#include <cmath>
#define MOD 1999999973
using namespace std;
int lgput(long long x, int y)
{
int z=1;
while(y!=0)
{
if(y%2==0)
{
x=(x*x)%MOD;
y/=2;
}
else
{
z=(z*x)%MOD;
y-=1;
}
}
return z;
}
int main()
{
int a,b,c;
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
scanf("%d %d", &a, &b);
c=lgput(a,b);
printf("%d", c);
return 0;
}