此题主要是要找到有多少个5
#include<iostream>
#include<fstream>
using namespace std;
int deal(int m){
if(m<10){
if(m>=5)
return 1;
else
return 0;
}
bool con=true;
int num5=0;
int su=1;
while(con){
su*=5;
num5+=m/su;
if(m/su==0)
con=false;
}
return num5;
}
int main(){
//ifstream cin("1.txt");
int t,m;
cin>>t;
while(t--){
cin>>m;
cout<<deal(m)<<endl;
}
return 0;
}