Pagini recente » Diferente pentru problema/bombar intre reviziile 8 si 7 | Monitorul de evaluare | Diferente pentru lot-2017 intre reviziile 8 si 9 | Diferente pentru template_shopping intre reviziile 13 si 14 | Cod sursa (job #1516021)
#include <bits/stdc++.h>
using namespace std;
ifstream in ("a.in");
ofstream out ("a.out");
const int MOD = 1999999973;
long long int LgPower (long long int x,long long int power){
if (power == 1) {
return x;
}
long long int k = LgPower(x,power / 2);
k = (k * k) % MOD;
if ( power % 2 == 1){
k =(k * x) % MOD;
}
return k;
}
int main()
{
long long int a, b;
in >> a >> b;
out << LgPower(a, b);
return 0;
}