Pagini recente » Borderou de evaluare (job #2668820) | Borderou de evaluare (job #2674114) | Cod sursa (job #2335862) | Borderou de evaluare (job #2664939) | Cod sursa (job #2335985)
#include <fstream>
#include <iostream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
int64_t power(int64_t x,int64_t n){
if(n==1)
return x;
if(n%2==0)
return power(x*x,n/2)%MOD;
return x*power(x*x,n/2)%MOD;
}
int main()
{
int64_t x,n;
cin>>x>>n;
cout<<power(x,n);
}