Pagini recente » Cod sursa (job #2277078) | Cod sursa (job #807383) | Cod sursa (job #2727182) | Cod sursa (job #3328747) | Cod sursa (job #3339365)
#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long power(long long baz, long long exp){
if(exp==0)
return 1;
long long half=power(baz,exp/2);
if(exp%2)
return half*half%1999999973*baz%1999999973;
else
return half*half%1999999973;
}
int main()
{
long long n,p;
fin >> n >> p;
long long nr=power(n,p);
fout << nr;
return 0;
}