Cod sursa(job #2470656)
Utilizator | Data | 9 octombrie 2019 17:28:38 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <iostream>
using namespace std;
int nrzero(int x)
{
int nr=5,s=0;
while(x>=nr)
s=s+x/nr,nr=nr*5;
return s;
}
int main()
{
int x;
cin>>x;
cout<<nrzero(x);
return 0;
}