Trailing zeros in factorial

Write codeMedium18 min

Your task

Given a non-negative integer n (up to 10^9), return the number of trailing zeros in n! (n factorial). For example 5! = 120 has one trailing zero. You must not compute n! directly, it is astronomically large.

Examples

trailing_zeros_factorial(n: int) -> int
Example 1
Inputtrailing_zeros_factorial(5)
Output1