Pagini recente » Cod sursa (job #272232) | Cod sursa (job #1452236) | Cod sursa (job #1231318) | Teoria jocurilor: numerele Sprague Grundy | Cod sursa (job #2572085)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
typedef long long ll;
const int MOD = 1999999973;
ll a, b;
ll lgpow(ll base, ll exp) {
ll ans;
ans = 1;
while (exp > 0) {
if (exp % 2 > 0) {
ans = (1LL * ans * base) % MOD;
}
exp /= 2;
base = (1LL * base * base) % MOD;
}
return ans;
}
int main() {
fin >> a >> b;
fout << lgpow(a, b) << "\n";
return 0;
}