Pagini recente » Cod sursa (job #2395217) | Cod sursa (job #1755853) | Istoria paginii runda/simulare_oji_10_3 | Cod sursa (job #126038) | Cod sursa (job #1241302)
#include<iostream>
#include<fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
#define MOD 1999999973
int n, p;
long long exp(long long a, int b) {
long long rez = 1;
while(b > 0) {
if(b%2) {
b--;
rez = (rez * a) % MOD;
}else {
a = (a * a) % MOD;
b /= 2;
}
}
return rez;
}
int main() {
fin >> n >> p;
cout << exp(n, p);
return 0;
}