Pagini recente » Cod sursa (job #2177271) | Cod sursa (job #1366016) | incalzire2020/clasament | Cod sursa (job #619889) | Cod sursa (job #1923232)
#include <fstream>
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
const long long NR_MOD=1999999973;
int main()
{
long long nr,put;
fin>>nr>>put;
long long auxput=put,solutie=1,auxnr=nr;
while(auxput>0)
{
if(auxput%2==1)
{
solutie=(solutie*auxnr)%NR_MOD;
}
auxput/=2;
auxnr=(auxnr*auxnr)%NR_MOD;
}
fout<<solutie;
return 0;
}