Cod sursa(job #1344715)
Utilizator | Data | 16 februarie 2015 22:27:07 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.26 kb |
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
int main()
{
int n,p,x;
ifstream f("lgput.in",ios::in);
ofstream g("lgput.out",ios::out);
f>>n>>p;
x=pow(n,p);
g<<x%1999999973;
return 0;
}