Pagini recente » Istoria paginii runda/simulare_olimpika0 | Cod sursa (job #2013753) | Statistici Mihnea Manolescu (MihneaManolescu) | Statistici Scarlat Ionut Alin (JohnnyUCV) | Cod sursa (job #2091245)
#include <fstream>
#include <iostream>
using namespace std;
long long n,x;
long long pat(long long x,long n)
{
if(n==0)
return 1;
if(n%2==0)
return (pat(x*x,n/2))%1999999973;
else
return (x*pat(x*x,(n-1)/2))%1999999973;
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
fin>>x>>n;
fout<<pat(x,n);
}