Pagini recente » Cod sursa (job #18506) | Cod sursa (job #2205912) | Cod sursa (job #2083413) | Cod sursa (job #2910145) | Cod sursa (job #1349836)
#include <iostream>
#include <fstream>
using namespace std;
#define LIMIT 1999999973
long long put(long long int x, long long int y)
{
if(y==0) return 1;
if(y==1) return x;
if(y%2==0) return put(x*x,y/2)%LIMIT;
return x*put(x*x,(y-1)/2)%LIMIT;
}
int main()
{
ifstream in("lgput.in");
ofstream out("lgput.out");
long long int x, y;
in >> x >> y;
out << put(x,y)%LIMIT << '\n';
return 0;
}