Pagini recente » Cod sursa (job #3172191) | Cod sursa (job #1860517) | Cod sursa (job #2664483) | Cod sursa (job #224707) | Cod sursa (job #2699394)
#include <bits/stdc++.h>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int lgput(int base, int exp)
{
int aux = base, ans = 1;
for(int i = 1; i <= exp; i *= 2)
{
if(exp & i)
{
ans *= aux;
ans %= MOD;
}
aux *= aux;
aux %= MOD;
}
return ans;
}
int main()
{
int n, p;
fin >> n >> p;
fout << lgput(n,p);
}