Cod sursa(job #2925318)
Utilizator | Data | 14 octombrie 2022 10:11:08 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.26 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;
int power = pow(n, p);
fout << power % 1999999973;
}