Pagini recente » Cod sursa (job #668778) | Cod sursa (job #629906) | Borderou de evaluare (job #1975061) | Statistici UAA - candrei - caheman - marintibi (noiscriecorect) | Cod sursa (job #1995466)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
#define MOD 1999999973
int n,p;
long long rez=1;
int main()
{
fin>>n>>p;
for(int k=p; k; k>>=1)
{
if(k&1)
rez=1LL*rez*n%MOD;
n=1LL*n*n%MOD;
}
fout<<rez%MOD;
fin.close();
fout.close();
return 0;
}