Pagini recente » Cod sursa (job #1234213) | Cod sursa (job #1349374) | Cod sursa (job #1778685) | Cod sursa (job #272819) | Cod sursa (job #1914858)
#include <bits/stdc++.h>
#define m 1999999973
#define ull unsigned long long
using namespace std;
ull ans,n,p;
int lgput(ull x, ull j){
ull ans=1;
if (j==0) return ans;
else if (j==1) return x;
else {
if (j%2==1) ans*=x*lgput(x*x,j/2)%m;
else ans*=lgput(x*x,j/2)%m;
return ans%m;
}
}
int main(){
ifstream cin ("lgput.in");
ofstream cout ("lgput.out");
cin>>n>>p;
cout<<lgput(n,p);
return 0;
}