Given an integer n, return the number of trailing zeroes in n!.
Note: Your solution should be in logarithmic time complexity.
Credits: Special thanks to @ts for adding this PRoblem and creating all test cases.
Subscribe to see which companies asked this question.
计算n的阶乘的最后有几个零,就是计算因数中2和5的最小个数,5的个数肯定比2的少,就是计算因数中5的个数
新闻热点
疑难解答