Pagini recente » Cod sursa (job #442165) | Cod sursa (job #238160) | Cod sursa (job #1921116) | Cod sursa (job #535287) | Cod sursa (job #650915)
Cod sursa(job #650915)
#include <fstream>
#define LL long long
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MO = 1999999973;
int power(int a, int e) {
int x = a, y = 1;
for (; e; e >>= 1, x = (LL)x * x % MO) if (e & 1) y = (LL)y * x % MO;
return y;
}
int main()
{
int N , P;
fin>>N>>P;
fout<<power(N,P);
return 0;
}