1 #include <iostream>
2 using namespace std;
3 inline void scan(int &x){
4 char ch;
5 while(ch=getchar(),ch<'0'||ch>'9');x=ch-'0';
6 while(ch=getchar(),ch>='0'&&ch<='9')x=x*10+ch-'0';
7 }
8 int main(){
9 //freopen("in.txt","r",stdin);
10 int cas,n,p;
11 scan(cas);
12 while (cas--){
13 scan(n);
14 p=0;
15 while (n){
16 n/=5;
17 p+=n;//how many 5,how many 0
18 }
19 printf("%d\n",p);
20 }
21 return 0;
22 }
posted on 2012-07-18 10:10
Leo.W 阅读(237)
评论(0) 编辑 收藏 引用