Pagini recente » Borderou de evaluare (job #3116371) | Borderou de evaluare (job #349118) | Borderou de evaluare (job #2181843) | Borderou de evaluare (job #3116369) | Cod sursa (job #1939695)
#include <iostream>
#include<stdio.h>
#define modulo 1999999973
using namespace std;
long long n, p, rez, nlaputere;
int main()
{
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
scanf("%ld %ld",&n,&p);
nlaputere=n;
rez=1;
while(p){
if (p&1)
rez=(rez*nlaputere)%modulo;
p/=2;
nlaputere=(nlaputere*nlaputere)%modulo;
}
printf("%lld",rez);
return 0;
}