Cod sursa(job #2428826)

Utilizator TheSHAD0WLepadatu Vlad-Tudor TheSHAD0W Data 6 iunie 2019 17:12:28
Problema Ridicare la putere in timp logaritmic Scor 10
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.25 kb
#include <fstream>
#include <cmath>
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
int main()
{
    long long n,p,x=1;
    in>>n>>p;
    for(int i=1;i<=p;i++)
        x*=n;
    out<<x%1999999973;
    return 0;
}