Pagini recente » Cod sursa (job #1352656) | Cod sursa (job #1255112) | Cod sursa (job #2056189) | Cod sursa (job #1801098) | Cod sursa (job #1969998)
#include <iostream>
#include <fstream>
using namespace std;
typedef long long LL;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
const LL mod = 1999999973;
LL Fast_pow(LL n, LL p) {
LL ans = 1LL;
while (p) {
if (p & 1) ans = (ans * n) % mod;
n = (n * n) % mod;
p = p >> 1;
}
return ans;
}
int main() {
ios_base :: sync_with_stdio(false);
LL n, p;
fin >> n >> p;
fout << Fast_pow(n, p) << "\n";
return 0;
}