Cod sursa(job #259963)
Utilizator | Data | 16 februarie 2009 10:48:33 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.24 kb |
#include <iostream.h>
#include <math.h>
#include <fstream.h>
fstream f("lgput.in",ios::in);
fstream g("lgput.out",ios::out);
long n,p;
long long k;
int main ()
{
f>>n;
f>>p;
p=pow(n,p);
k=p%1999999973;
g<<k;
return 0;
}