Available question text
Count how many nonnegative integers x satisfy f(x)=k, where f(x) is the number of trailing zeros in x! (i.e., the sum of floor(x/5^i)).
Key insight: f is nondecreasing with jumps aligned to multiples of 5, so the preimage size can be found by binary-searching the range for k (and is either 0 or 5).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 793. Preimage Size of Factorial Zeroes Function
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source