Pagini recente » Cod sursa (job #1389363) | Cod sursa (job #2792480) | Cod sursa (job #2174955) | Cod sursa (job #1083027) | Cod sursa (job #1359877)
#include <fstream>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long n,p;
long long Sol=1;
void citeste()
{
fin>>n>>p;
}
void solutie()
{
while(p)
{
if(p%2==1)
Sol = (Sol * n) % MOD;
n = (n * n)%MOD;
p = p/2;
}
}
void afiseaza()
{
fout<<Sol<<"\n";
}
int main()
{
citeste();
solutie();
afiseaza();
return 0;
}