Pagini recente » Diferente pentru sandbox intre reviziile 338 si 339 | Cod sursa (job #2481599) | Cod sursa (job #2966157) | Cod sursa (job #2305767) | Cod sursa (job #2765956)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int mod = 1999999973;
int n, p;
int pow(int x, int p)
{
int aux = 1;
while(p)
{
if(p & 1)
{
aux = (1LL * aux * x) % mod;
}
x = (1LL * x * x) % mod;
p /= 2;
}
return aux;
}
int main()
{
fin >> n >> p;
fout << pow(n, p);
return 0;
}