Cod sursa(job #705270)
| Utilizator | Data | 3 martie 2012 22:06:46 | |
|---|---|---|---|
| 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;
ifstream f("lgput.in");
ofstream g("lgput.out");
int n,p;
unsigned long long x;
int main()
{
f>>n>>p;
x=1;
for(int i=1;i<=p;++i) x=x*n;
g<<x<<'\n';
return 0;
}
