Cod sursa(job #630906)
| Utilizator | Data | 6 noiembrie 2011 18:40:45 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<ifstream>
using namespace std;
int main()
{
long x,i,cont,aux;
ifstream f("fact.in");
ofstream g("fact.out");
f>>x;
cont=0;
i=5;
while(cont<x)
{
aux=i;
while(aux%5==0)
cont++,aux=aux/5;
i+=5;
}
g<<i;
return 0;
}
