Pagini recente » Cod sursa (job #996396) | Cod sursa (job #1611424) | Cod sursa (job #1863014) | Cod sursa (job #899791) | Cod sursa (job #2568676)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int Mod = 1999999973;
int n, x;
int Lgput(int a, int b)
{
int p = 1;
while(b)
{
if(b % 2) p = 1LL * p * a % Mod;
a = 1LL * a * a % Mod;
b /= 2;
}
return p;
}
int main()
{
fin >> n >> x;
fout << Lgput(n, x) << "\n";
fin.close();
fout.close();
return 0;
}