Pagini recente » Cod sursa (job #3004436) | Cod sursa (job #2759258) | Cod sursa (job #2759466) | Cod sursa (job #3253121) | Cod sursa (job #3123512)
#include <iostream>
#include <fstream>
using namespace std;
typedef long long i64;
i64 pow(i64 baza, i64 exp){
if(exp==0) return 1;
i64 result=pow(baza, exp/2);
if(exp%2==0) return result*result;
return result*result*baza;
}
#define NR 1999999973
int main(){
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int N, P;
fin>>N>>P;
fout<<pow(N, P)%NR;
return 0;
}