Pagini recente » Rating HenriqueG (HenriqueG) | Cod sursa (job #1885420) | Cod sursa (job #2792084) | Cod sursa (job #2637385) | Cod sursa (job #2345612)
#include <fstream>
using namespace std;
int R = 1;
const int MOD = 1999999973;
int pow(int num, int expo) {
while(expo != 0) {
if(expo % 2 == 1)
R = (1LL * R * num) % MOD;
num = (1LL * num * num) % MOD;
expo /= 2;
}
return R;
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int a, b;
fin >> a >> b;
fout << pow(a, b);
return 0;
}