Pagini recente » Cod sursa (job #2816692) | Cod sursa (job #2763487) | Cod sursa (job #2974769) | Cod sursa (job #2225620) | Cod sursa (job #726313)
Cod sursa(job #726313)
#include <cstdio>
using namespace std;
int a,b;
long long pow(int a, int b)
{
long long aux=1;
if (b==1) return a;
else
{
if (b%2==0)
{
aux=pow(a,b/2)%1999999973;
return aux*aux%1999999973;
}
else return a*pow(a,b-1)%1999999973;
}
}
int main()
{
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
scanf("%d%d",&a,&b);
printf("%lld",pow(a,b)%1999999973);
return 0;
}