Pagini recente » Cod sursa (job #62798) | Cod sursa (job #2753508) | Cod sursa (job #2055521) | Cod sursa (job #30250) | Cod sursa (job #2167974)
#include <iostream>
#include <fstream>
#include <algorithm>
#include <math.h>
#define MOD 1999999973
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
unsigned int n,p;
unsigned long long putere(int x,int y)
{
unsigned long long r=1;
while(y)
{
if(y%2==1)
r=(r*x)%MOD;
x=(x*x)%MOD;
y/=2;
}
return r;
}
int main()
{
in>>n>>p;
out<<putere(n,p);
return 0;
}