Pagini recente » Cod sursa (job #440928) | Cod sursa (job #252359) | Cod sursa (job #1517521) | Cod sursa (job #1320290) | Cod sursa (job #2845570)
#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(uint32_t x, uint32_t 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);
}