Pagini recente » Cod sursa (job #1719915) | Cod sursa (job #1309916) | Diferente pentru happy-coding-2007/solutii intre reviziile 12 si 56 | Cod sursa (job #1839586) | Cod sursa (job #2335956)
#include <fstream>
#include <iostream>
#define NMAX 1999999973
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
long long power(long long x,long y){
if(y==1)
return x;
if(y%2==0)
return power(x*x,y/2)%NMAX;
return x*power(x*x,y/2)%NMAX;
}
int main(){
long long x;
long long y;
f>>x>>y;
g<<power(x,y);
}