Pagini recente » Cod sursa (job #3217421) | Cod sursa (job #736) | Cod sursa (job #2456517) | Cod sursa (job #2979672) | Cod sursa (job #3297446)
#include <bits/stdc++.h>
#define MOD 1999999973
#define ll long long
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ll n, p, rez = 1;
int main() {
ios_base::sync_with_stdio(false);
fin.tie(NULL);
fout.tie(NULL);
fin >> n >> p;
while (p) {
if (p & 1) {
rez = (rez * n) % MOD;
}
n = (n * n) % MOD;
p >>= 1;
}
fout << rez;
return 0;
}