TRAILING ZEROES
CodeChefOpen on judge ↗
The Chef was an exceptionally great student, but did not write any of his exams well, and used to fail a lot receiving zeros in a lot of problems. This caused the Chef to have a fascination towards zeros. The Chef wanted to write a program to help him find the number to trailing zeros. Let there be a whole number N such that N! (N factorial) when written in base 10 (decimal notation) ends in P Ze
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