0793. Preimage Size of Factorial Zeroes Function
https://leetcode.com/problems/preimage-size-of-factorial-zeroes-function
Description
Let f(x)
be the number of zeroes at the end of x!
. Recall that x! = 1 * 2 * 3 * ... * x
and by convention, 0! = 1
.
For example,
f(3) = 0
because3! = 6
has no zeroes at the end, whilef(11) = 2
because11! = 39916800
has two zeroes at the end.
Given an integer k
, return the number of non-negative integers x
have the property that f(x) = k
.
Example 1:
Example 2:
Example 3:
Constraints:
0 <= k <= 109
ac
Last updated