Pagini recente » Statistici Anca-Maria Hanes (ancah) | Borderou de evaluare (job #1366781) | Borderou de evaluare (job #864173) | Borderou de evaluare (job #1226386) | Cod sursa (job #2278221)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f ("lgput.in");
ofstream g ("lgput.out");
long int exp(int x,int y)
{
if(y==0)
{
return 1;
}
if(y%2)
{
return x*exp(x,y-1);
}
if(!(y%2))
{
return exp(x,y/2)*exp(x,y/2);
}
}
int main()
{
long int n,p;
f>>n>>p;
g<<(long)((exp(n,p))%1999999973);
}