Pagini recente » Cod sursa (job #851084) | Cod sursa (job #3132495) | Cod sursa (job #1337234) | Cod sursa (job #1318546) | Cod sursa (job #2443517)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int mdl = 1999999973;
int b, ex;
#define ll long long
int lgput(int b, int ex)
{
if(ex == 0) return 1;
if(ex == 1) return b;
if(ex % 2)
return lgput(1LL * b * b % mdl, ex / 2)* b % mdl;
return lgput(1LL * b * b % mdl, ex / 2);
}
int main()
{
fin >> b >> ex;
fout << lgput(b, ex);
return 0;
}