Cod sursa(job #1396619)
| Utilizator | Data | 22 martie 2015 19:24:52 | |
|---|---|---|---|
| Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.24 kb |
#include <fstream>
using namespace std;
long long n,p,x,i;
int main()
{
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
fin>>n>>p;
x=1;
for (i=1;i<=p;i++)
x=x*n;
fout<<x;
return 0;
}
