Pagini recente » Cod sursa (job #2697546) | Cod sursa (job #1284320) | Cod sursa (job #2857175) | Cod sursa (job #1268404) | Cod sursa (job #2737500)
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cerr << #x << " = " << x << "\n";
const int mod = 1999999973;
ifstream in("lgput.in");
ofstream out("lgput.out");
int a, b;
int lgpow(int a, int b) {
int ans = 1;
while (b > 0) {
if (b % 2 > 0) {
ans = (1LL * ans * a) % mod;
}
a = (1LL * a * a) % mod;
b /= 2;
}
return ans;
}
int main() {
in >> a >> b;
out << lgpow(a, b) << "\n";
return 0;
}