Pagini recente » Cod sursa (job #645733) | Istoria paginii runda/emag_2016-incepatori-3 | Cod sursa (job #513169) | Cod sursa (job #1384882) | Cod sursa (job #2159635)
#include<iostream>
#include<fstream>
#define ull unsigned long long
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
ull a,b;
const ull MOD = 1999999973;
ull powr(ull x,ull y)
{
ull p=1;
while(y)
{
while(y%2==0)
{
y/=2;
x*=x;
}
p*=x;
p=p%MOD;
y--;
}
return p;
}
int main()
{
f>>a>>b;
g<<powr(a,b)%MOD;
return 0;
}