Pagini recente » Cod sursa (job #2473480) | Cod sursa (job #1584574) | Cod sursa (job #3189025) | Cod sursa (job #3166743) | Cod sursa (job #146539)
Cod sursa(job #146539)
#include <cstdio>
using namespace std;
unsigned long long x,y,m;
long long put(long long x, long long y)
{
if (y==1)
{
return x;
}
if (y%2)
{
return (put(x,y-1)%m*x)%m;
}
else
{
return (put(x,y/2)%m)*(put(x,y/2)%m)%m;
}
}
int main(){
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
m=1999999973;
scanf("%lld%lld",&x,&y);
printf("%lld\n",put(x,y));
return 0;
}