Cod sursa(job #2566567)
| Utilizator | Data | 2 martie 2020 22:02:45 | |
|---|---|---|---|
| Problema | Ridicare la putere in timp logaritmic | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.3 kb |
#include <iostream>
#include <fstream>
using namespace std;
long long d = 1999999973;
int main() {
int n, p;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
fin >> n >> p;
fin.close();
for(int i = 0; i < p; i++)
n *= n;
fout << n%d;
fout.close();
return 0;
}
