Divisible by 25
CodeChefOpen on judge ↗
Chef loves mathematics. Chef wants to find if a number is divisible by $25$. If the number is not divisible by $25$ he wants to make it divisible by $25$ by removing certain digits from the number. The operation cannot be performed if only one digit remains. If the resulting number contains leading zeroes, they are automatically removed. How many minimum number of digits should be removed so that
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