Pagini recente » Cod sursa (job #3282195) | Cod sursa (job #2231766) | Cod sursa (job #2911049) | Cod sursa (job #2604221) | Cod sursa (job #2374555)
#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*a%mod;
}
int main()
{
in>>n>>p;
out<<Rlog(n,p);
return 0;
}