Cod sursa(job #659917)
Utilizator | Data | 11 ianuarie 2012 11:17:57 | |
---|---|---|---|
Problema | Factorial | Scor | 35 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<fstream>
using namespace std;
int main ()
{unsigned n,b,p,c=0,k=0;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
do
{c=c+5;b=c;
while(b%5==0)
{k=k+1;
b=b/5;}}
while(k!=p);
if(p==0)
c=1;
g<<c;
f.close();
g.close();
return 0;}