Cod sursa(job #2949595)
Utilizator | Data | 1 decembrie 2022 06:56:52 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.27 kb |
#include <iostream>
#include <cmath>
#include <fstream>
using namespace std;
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long n, p;
fin >> n >> p;
long long power = pow(n, p);
fout << power % 1999999973;
}