**
航电oj:Factorial
**
#题目描述
#题目bb这么多就只问你 n 的阶乘中有多少个0
#肯定不能撒一样的算出来在数 要知道1~9 中只有2的倍数和5的倍数相乘才会有0出现 2比5多 那就只要找5的倍数 就行
#知识点
数学
#代码
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int math(int n)
{
int sum = 0;
while(n)
{
sum += (n/5);
n /= 5;
}
return sum;
}
int main()
{
scanf("%d",&n);
while(n--)
{
int m;
scanf("%d",&m);
printf("%d\n",math(m));
}
return 0;
}
#总结
数学类型的题要找到规律就好写