Pagini recente » Cod sursa (job #2413101) | Cod sursa (job #959978) | Cod sursa (job #211996) | Cod sursa (job #443877) | Cod sursa (job #2450278)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
int ridicareLogaritmica(int n, int p) {
int r = 1;
while (p) {
if (p % 2 == 1)
r = (1LL * r * n) % MOD;
n = (1LL * n * n) % MOD;
p /= 2;
}
}
int main() {
int n, p;
fin >> n >> p;
fout << ridicareLogaritmica(n, p);
return 0;
}