Pagini recente » Rating Teodora Crivineanu (teodoracrivineanu) | Diferente pentru problema/sortaret intre reviziile 45 si 47 | Cod sursa (job #2041894) | Diferente pentru problema/sortaret intre reviziile 33 si 47 | Cod sursa (job #3243509)
#include <iostream>
#include <fstream>
using namespace std;
long long power(long long x, long long n) {
if (n == 0) return 1;
if (n % 2) return x * power(x * x, n/2);
return power(x * x, n / 2);
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long n, p;
fin >> n >> p;
fout << power(n, p) % 1999999973;
return 0;
}