Pagini recente » Profil N3O_7H3_H4CK3R | Borderou de evaluare (job #2373692) | Diferente pentru documentatie intre reviziile 38 si 39 | Rezultatele filtrării | Cod sursa (job #3141480)
#include <bits/stdc++.h>
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 = power(a, b / 2);
if (b % 2 == 0) {
return power(a, b / 2) % DIVISOR * power(a, b / 2) % DIVISOR;
}
return power (a, b-1) % DIVISOR;
}
int main() {
int n, p;
fin >> n >> p;
fout << power(n, p);
return 0;
}