Pagini recente » Cod sursa (job #364432) | Diferente pentru problema/algoritm intre reviziile 15 si 16 | Cod sursa (job #1584180) | Cod sursa (job #1549859) | Cod sursa (job #2422721)
#include <bits/stdc++.h>
#define MOD 1999999973
#define ull unsigned long long
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ull powlog(ull x,ull n){
ull P = 1;
while(n){
if(n%2){
P = (P*x)%MOD;
}
x = (x*x)%MOD;
n/=2;
}
return P;
}
int main()
{
ull a,b;
fin>>a>>b;
fout<<powlog(a,b)<<endl;
return 0;
}