Pagini recente » Cod sursa (job #469159) | Cod sursa (job #1464569) | Cod sursa (job #2463013) | marioneta | Cod sursa (job #3298632)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
long long pow(long long x, long long exp) {
if (exp == 0) return 1;
x %= MOD;
long long a = 1;
if (exp % 2) a = x;
long long aux = pow(x, exp / 2);
aux = (aux * aux) % MOD;
return (aux * a) % MOD;
}
int main() {
long long n, p;
fin >> n >> p;
fout << pow(n, p);
return 0;
}