Pagini recente » Cod sursa (job #2317074) | Cod sursa (job #2957719) | Cod sursa (job #1770339) | Cod sursa (job #946065) | Cod sursa (job #2716650)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int mod = 1999999973;
long long n, p;
void Read(){
fin >> n >> p;
}
long long LgPow(long long base, long long exponent){
long long aux = base, ans = 1;
while (exponent){
if (exponent % 2 == 1)
ans = ans * aux % mod;
exponent /= 2;
aux = aux * aux % mod;
}
return ans;
}
void Print(){
fout << LgPow(n, p) << '\n';
}
int main(){
Read();
Print();
return 0;
}