Pagini recente » Cod sursa (job #1273408) | Cod sursa (job #1564550) | Cod sursa (job #151866) | Cod sursa (job #2481170) | 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;
}