Pagini recente » Cod sursa (job #3162989) | Cod sursa (job #596206) | Cod sursa (job #2098233) | Cod sursa (job #2714732) | 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;
}