Cod sursa(job #306138)
Utilizator | Data | 19 aprilie 2009 20:58:15 | |
---|---|---|---|
Problema | Numere 2 | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include<fstream.h>
#include<iostream.h>
#include<math.h>
long int a,b,x,p;
int main ()
{
ifstream in ("numere2.in");
ofstream out("numere2.out");
in>>p;
for (a=1;a<=100;a++)
{ for (b=1;b<=100;b++)
x=pow(a,b);
if(x==p) out<<a<<endl;
out<<b; }
return 0;
}