http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1022
//记录因子5的个数
#include<iostream>
using namespace std;
int main()
{
    
int t;
    cin
>>t;
    
while(t--)
    
{
        __int64 n,sum
=0,p=5;
        scanf(
"%I64d",&n);
        
while(p<=n)
        
{
            sum 
+= n/p;
            n 
/= 5;
        }

        printf(
"%I64d\n",sum);
    }

    
return 0;
}