A mathematical trick
CodeChefOpen on judge ↗
Ms. A is good at mathematics and she wants to trick her little brother Mr. X who is not very good at mathematics. She gives him a number and asks her to tell her the minimum number of digits that needs to be changed so that the number is divisible by 13. Note : One can also change all digits to 0 as divisible by any number. Help Mr. X in completing the challenge. Input The first line inputs a
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