Factorial Trailing Zeroes

题目描述:给定一个整数n,返回n!尾部0的个数

例子:
one:
input:5,output:1
two:
input:10,output:2

思路一(蛮力法):求出n的阶乘,在从右往左求出尾部0的个数
def main():
    interger = int(input("please input a interger:"))
    temp = 1
    for i in range(1,interger+1):
        temp*=i
    print(temp)
    count = 0
    if temp%10 == 0:
        count+=1
    print(count)
    return count
if __name__ == "__main__":
    main()

缺点:算法时间效率低,一旦n值变大,n!将会变得非常大

;