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