Cod sursa(job #428599)
| Utilizator | Data | 29 martie 2010 13:33:39 | |
|---|---|---|---|
| Problema | Factorial | Scor | 15 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
int p,n=0,nr=0;
ifstream fin("fact.in");
ofstream fout("fact.out");
fin>>p;
if (p==0) fout<<"1";
else
/*while (p>0)
{
n+=5;
nr=n;
while (nr%5==0)
{
p-=1;
nr=nr/5;
}
}*/
//if(p<0)
fout<<"-1";
//else fout<<n;
return 0;
}
