Pagini recente » Cod sursa (job #3134694) | Cod sursa (job #3269924) | Cod sursa (job #1081962) | Cod sursa (job #2142447) | Cod sursa (job #2311105)
#include<fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int modulo=1999999973;
void power(long long n,long long p,long long &solution){
while(p){
if(p%2==1) solution=solution*n%modulo;
n=n*n*modulo;
p=p/2;
}
}
int main(){
long long n,p,solution;
fin>>n>>p;
solution=1;
power(n,p,solution);
fout<<solution;
return 0;
}