Pagini recente » Cod sursa (job #3202544) | Cod sursa (job #2152316) | Cod sursa (job #419793) | Cod sursa (job #2939620) | Cod sursa (job #1909030)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int mod = 1999999973;
int N,P;
inline int Pow_Lg(int x, int p)
{
int aux = 1;
while(p)
{
if(p & 1)
{
aux = (1LL*aux*x)%mod;
p--;
}
x = (1LL*x*x)%mod;
p/=2;
}
return aux;
}
int main()
{
fin >> N >> P;
fout << Pow_Lg(N,P) << "\n";
fout << "\n";
return 0;
}