Pagini recente » Cod sursa (job #2678859) | Cod sursa (job #896712) | Cod sursa (job #668682) | Cod sursa (job #2376551) | Cod sursa (job #3141170)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int DIVISOR = 1999999973;
long long power(int a, int b) {
if (b == 0) {
return 1;
}
long long num = powerRising(a, b / 2);
if (b % 2 == 0) {
return result * result % DIVISOR;
}
return ((long long) (num % DIVISOR) * (num % DIVISOR) % DIVISOR) * (a % DIVISOR) % DIVISOR;
}
int main() {
int base, power;
fin >> base >> power;
fout << power(base, power);
return 0;
}