Pagini recente » Diferente pentru problema/strava intre reviziile 4 si 3 | Cod sursa (job #1341910) | Cod sursa (job #1825235) | Cod sursa (job #527364) | Cod sursa (job #2573953)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const long long MOD = 1999999973;
long long n, p, aux = 1;
int main()
{
fin>>n>>p;
while(p > 1)
{
if(p%2)
{
aux = (aux * n) % MOD;
}
n*=n;
n%=MOD;
p/=2;
}
fout<<(n*aux)%MOD;
fin.close();
fout.close();
return 0;
}