Cod sursa(job #937675)
Utilizator | Data | 10 aprilie 2013 20:19:26 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
long long p, n;
int main ()
{
f >> p;
while(p%5 == 0)
{
n += p/5;
p = p/5;
}
g << n;
return 0;
}