Cod sursa(job #1110470)
Utilizator | Data | 18 februarie 2014 09:16:56 | |
---|---|---|---|
Problema | Factorial | Scor | 35 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int n=0,k=0,p,x;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
while(k<p)
{n=n+5;
x=n;
while(x%5==0)
{k++;
x=x/5;}}
g<<n;
return 0;
}