Cod sursa(job #1594795)
Utilizator | Data | 9 februarie 2016 19:05:24 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.22 kb |
#include <iostream>
#include<math.h>
#include<fstream>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int main()
{
unsigned long n,p,k;
f>>n>>p;
k=pow(n,p);
g<<k%1999999973;
}