#45357: 10=5*2


yp11351280@yphs.tp.edu.tw (810-43韓睿哲)


2的倍數一定多於5的倍數,所以看有幾個五就好了。

#include<iostream>
using namespace std;
int main(){
long long int n,zero;
while(cin>>n){
long long int temp=5,sum=0;
while(1){
zero=n/temp;
if(zero==0) break;
else{ sum+=zero;temp*=5;
}
}
cout<<sum<<endl;
}
}