Pagini recente » Monitorul de evaluare | Monitorul de evaluare | Diferente pentru problema/vagoane intre reviziile 23 si 49 | Diferente pentru utilizator/stef2n intre reviziile 26 si 39 | Cod sursa (job #2985856)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
long long N,P;
const int m=1999999973;
long long e(long long N , long long P)
{
if(P== 0)
return 1;
long long x = e(N , P / 2);
if(P % 2 == 1)
return N*x*x%m;
return x*x%m;
}
int main()
{
fin>>N>>P;
fout<<e(N,P);
}