Pagini recente » Diferente pentru problema/fibo4 intre reviziile 6 si 7 | Cod sursa (job #1132786) | Cod sursa (job #1132780) | Cod sursa (job #2333544) | Cod sursa (job #2335986)
#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;
fin>>x>>n;
fout<<power(x,n);
}