Pagini recente » Cod sursa (job #1081027) | Cod sursa (job #6908) | Cod sursa (job #2313939) | Cod sursa (job #2936139) | Cod sursa (job #1100585)
#include<cstdio>
using namespace std;
typedef long long int LL;
const int MOD = 1999999973;
LL N,P;
LL Exp(LL B,LL E)
{
if(E==0) return 1LL;
if(E==1) return B;
LL t=Exp(B,E/2);
return ((t*t)%MOD*Exp(B,E%2))%MOD;
}
int main()
{
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
scanf("%lld%lld",&N,&P);
N%=MOD;
printf("%lld\n",Exp(N,P));
return 0;
}