Pagini recente » Cod sursa (job #1559777) | Cod sursa (job #1854581) | Cod sursa (job #2229051) | Cod sursa (job #1688848) | Cod sursa (job #2374559)
#include <iostream>
#include <fstream>
#define mod 1999999973
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
long long n,p;
int Rlog(long long a, long long b){
if(b==0) return 1;
if(b==1) return a;
long long x=Rlog(a,b/2);
if(b%2==0) return x*x%mod;
else return x*x%mod*a%mod;
}
int main()
{
in>>n>>p;
out<<Rlog(n,p);
return 0;
}