Check Divisibility
CodeChefOpen on judge ↗
Diwali is arriving and Rahul wants to give his girlfriend a gift. He decides the gift to be a list of numbers such that each of the numbers are special. A number is considered special if sum of its digit is divisible by 9. If a number is not special, then Rahul has to find the nearest special number and convert his number to that at the cost = abs( nearest special number - current number) Note th
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