Pagini recente » Cod sursa (job #2118856) | Cod sursa (job #123377) | Cod sursa (job #659244) | Cod sursa (job #2886771) | Cod sursa (job #1349835)
#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;
}