Pagini recente » Cod sursa (job #3259746) | Cod sursa (job #3206574) | Cod sursa (job #2159643) | Cod sursa (job #993074) | Cod sursa (job #864094)
Cod sursa(job #864094)
#include<fstream>
using namespace std;
#define Mod 1999999973
ifstream f("lgput.in");
ofstream g("lgput.out");
long long n,p;
long long exp(int k)
{
long long t;
if (k==1) return n;
else if (k%2==0)
{
t=exp(k>>1);
return ((t%Mod)*(t%Mod))%Mod;
}
else return (((exp(k-1))%Mod)*n)%Mod;
}
int main()
{
f>>n>>p;
g<<exp(p)<<'\n';
return 0;
}