Pagini recente » Cod sursa (job #791218) | Cod sursa (job #1771707) | Cod sursa (job #2967449) | Cod sursa (job #2245590) | Cod sursa (job #2485471)
#include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <bitset>
using namespace std;
const int MOD = 1999999973;
int put_log(int n, int p) {
int r = 1;
while (p > 0) {
if (p & 1) {
r = (r * (n % MOD))%MOD;
}
n = (n * n)%MOD;
p>>=1;
}
return r;
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int x, y;
fin >> x >> y;
fout << put_log(x, y);
}