找出n的阶乘末尾有几个零

原理:因为10由2*5组成,而构成2的因数比5多 所以最终转换成求5的个数

int getNumber(int n)
{
	int count = 0;
	while(n)
	{
		n = n/5;
		count = count +n;
	}
	return count;
}
原文地址:https://www.cnblogs.com/liuweilinlin/p/3300123.html