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的階乘的最后有幾個零,就是計算因數(shù)中2和5的最小個數(shù),5的個數(shù)肯定比2的少,就是計算因數(shù)中5的個數(shù)
新聞熱點(diǎn)
疑難解答