Pagini recente » Cod sursa (job #1252874) | Cod sursa (job #2877390) | Cod sursa (job #438849) | Cod sursa (job #1276831) | Cod sursa (job #1248088)
#include <fstream>
#include <cstdint>
using namespace std;
uint64_t powm(uint64_t b, uint64_t e, uint64_t m) {
uint64_t r = 1;
while(e) {
if (e % 2)
r = (r * b) % m;
b = (b * b) % m;
e >>= 1;
}
return r;
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
uint64_t e, b;
fin >> e >> b;
fout << powm(e, b, 1999999973) << endl;
return 0;
}