Pagini recente » Cod sursa (job #847356) | Cod sursa (job #908526) | Cod sursa (job #908860) | Cod sursa (job #2591573) | Cod sursa (job #2638813)
#include <iostream>
#include <fstream>
using namespace std;
int MOD = 1999999973;
int lgput(int x, int n) {
if (n == 1) {
return x;
} else if (n % 2 == 0) {
return lgput (1LL * x * x % MOD, n / 2);
} else {
return 1LL * x * lgput(x * x, (n - 1)/2) % MOD;
}
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int n, p, remainder;
fin >> n >> p;
fout << remainder;
return 0;
}