Cod sursa(job #387574)
Utilizator | Data | 27 ianuarie 2010 22:02:50 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<fstream>
#include<iostream>
using namespace std;
int main()
{
int n,p,n5=0;
ifstream fin("factorial.in");
fin>>p;
while(n5!=p)
for(n=1;;n++)
while(n%5==0)
{
n5++;
}
ofstream fout("factorial.out");
fout<<n;
return 0;
}