Cod sursa(job #873570)
Utilizator | Data | 7 februarie 2013 13:40:29 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.28 kb |
#include<fstream>
#include<cmath>
using namespace std;
int main()
{
ifstream fin("lgput.in");
ofsteam fout("lgput.out");
int n, p, d, s;
fin>>n>>p;
d=pow(n, p);
s=d%1999999973;
fout<<s<<" ";
fin.close();
fout.close();
return 0;
}