Pagini recente » Cod sursa (job #2159541) | Rating Mateita David (napsausage) | Cod sursa (job #1938712) | Cod sursa (job #1315223) | Cod sursa (job #1487859)
#include <iostream>
#include <fstream>
using namespace std;
long long N,P;
long long putere( long long x, long long p)
{
long long m=1999999973;
if (p==0)
return 1;
long long aux=putere (x,p/2);
if (p%2==0)
return (aux*aux)%m;
return (aux*aux%m*x)%m;
}
int main()
{
ifstream f("lgput.in");
ofstream g("lgput.out");
f>>N>>P;
g<<putere(N,P);
return 0;
}