Pagini recente » Cod sursa (job #2327294) | Cod sursa (job #2120466) | Cod sursa (job #1001924) | Cod sursa (job #787396) | Cod sursa (job #2953802)
#include <iostream>
#include <algorithm>
#include <vector>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int exp(long long x, long long n) {
if (n == 1) {
return x;
}
if (n % 2 == 1) {
return x * exp(x, n - 1);
}
int tmp_exp = exp(x, n / 2);
return tmp_exp * tmp_exp;
}
int main() {
long long x, n;
fin >> x >> n;
fout << exp(x, n) % 1999999973;
}