Pagini recente » Cod sursa (job #2530237) | Diferente pentru problema/lkperm intre reviziile 3 si 4 | Cod sursa (job #2177891) | Cod sursa (job #1604773) | Cod sursa (job #2741008)
#include <fstream>
using namespace std;
const int m=1999999973;
long long LogPow(int a,int b)
{
if(b==0)
{
return 1;
}
if(b%2==0)
{
long long half=LogPow(a,b/2);
return half*half;
}
return LogPow(a,b-1)*a;
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int n,p;
fin>>n>>p;
fout<<(LogPow(n,p)%m);
return 0;
}