Pagini recente » Diferente pentru problema/canguri intre reviziile 2 si 1 | Cod sursa (job #2478923) | Monitorul de evaluare | Cod sursa (job #854742) | Cod sursa (job #2488444)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long put(long long a,long long b)
{
if(b==0)
return 1;
if(b%2==1)
return a*put(a,b-1)%1999999973;
return put(a*a%1999999973,b/2)%1999999973;
}
int main()
{
long long a,b;
fin>>a>>b;
fout<<put(a,b);
return 0;
}