number of trailing zeros in factorial python
def findTrailingZeros(n): # Initialize result count = 0 # Keep dividing n by # 5 & update Count while(n >= 5): n //= 5 count += n return count # Driver program n = 100 print("Count of trailing 0s " + "in 100! is", findTrailingZeros(n))