Pagini recente » Profil Simon2712 | Istoria paginii utilizator/wdlgedfzdfb | Diferente pentru probleme-de-taietura intre reviziile 96 si 81 | Istoria paginii utilizator/edycristian | Cod sursa (job #1561574)
#include<iostream>
#include<fstream>
using namespace std;
const int MOD=1999999973;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int lgput (int x,int y)
{
int z=1;
while (y!=0)
{
if (y%2==0)
{
x=(x*x)%MOD;
y=y/2;
}
else
{
z=(z*x)%M;
y=y-1;
}
}
return z;
}
int main ()
{
int a,b;
fin>>a>>b;
int x=lgput(a,b);
fout<<x;
}