Pagini recente » Rating luca clg (lucaclg) | Cod sursa (job #960079) | Diferente pentru preoni-2007 intre reviziile 16 si 15 | Profil Lenut | Cod sursa (job #3146097)
#include <bits/stdc++.h>
using namespace std;
ifstream f ("lgput.in");
ofstream g ("lgput.out");
long long n,p;long long mod=1999999973;
long long exp (long long x, long long n)
{
if(n==0)
return 1;
if(n%2==0)
return exp((x*x)%mod,n/2)%mod;
else return (x*exp((x*x)%mod,(n-1)/2))%mod;
}
int main()
{
f>>n>>p;
g<<exp(n,p)%mod;
return 0;
}