Pagini recente » Cod sursa (job #1533150) | Cod sursa (job #2747519) | Cod sursa (job #2032082) | Cod sursa (job #1962531) | Cod sursa (job #2845568)
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
#ifdef LOCAL
ifstream f("input.txt");
#define g cout
#else
ifstream f("lgput.in");
ofstream g("lgput.out");
#endif
const int MOD = 1999999973;
uint32_t x, y;
int pow2(int x, int y) {
if (y == 0)
return 1;
else if (y % 2 == 0)
return pow2((1LL * x * x) % MOD, y / 2);
else
return 1LL * x * pow2(x * x, (y-1) / 2) % MOD;
}
int main() {
f >> x >> y;
g << pow2(x, y);
}