← All problemsSign in

Manasvi Strikes Again

Problem description. Manasvi continued his-level research on factorials and realized that factorial of every number after 5 always end with 0. With further observations he concluded that for every number n1 , trailing zeroes of its factorial will be z1 and for every number n2 , trailing zeroes of its factorial will be z2. Also, if n1 n2 then z1 ≤ z2 Input - The first line of the input contains

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start