Pagini recente » Cod sursa (job #658200) | Cod sursa (job #1051172) | Cod sursa (job #2325831) | Cod sursa (job #1694770) | Cod sursa (job #2183158)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
typedef unsigned long long ll;
ll n,p;
ll putere(ll x, ll y) {
if(y==1) return x;
ll aux=putere(x, y/2);
if(y&1) return ((((aux*aux)%MOD)*x)%MOD);
return (aux*aux)%MOD;
}
int main()
{
fin>>n>>p;
fout<<putere(n,p);
return 0;
}