Cod sursa(job #3221239)
Utilizator | Data | 6 aprilie 2024 12:43:28 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 30 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.27 kb |
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long N,P,R,i;
int main()
{
fin>>N>>P;
R=1;
for(i=1; i<=P; i++)
{
R=R*N;
R=R%1999999973;
}
fout<< R;
return 0;
}