Zeroes VII
CodeChefOpen on judge ↗
Factorial \( n \) or \( n! \) is defined as below: $$ n! = 1 \times 2 \times 3 \times \dots \times n $$ For example, \( 7! = 1 \times 2 \times 3 \times 4 \times 5 \times 6 \times 7 = 5040 \). Now, if we prime factorize a factorial, we will be able to find the frequency of each prime in it. For example, \( 7! = 5040 = 2^4 \times 3^2 \times 5 \times 7 \). So there are exactly four \( 2 \)'s, two \
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start