Pagini recente » Cod sursa (job #653618) | Cod sursa (job #1632683) | Cod sursa (job #3128492) | Cod sursa (job #2761919) | Cod sursa (job #1241304)
#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;
fout << exp(n, p);
return 0;
}