← All problemsSign in

Invert Digits

Little Chintu is a smart and naughty kid. He was bothering his teacher in class. so that, his teacher gives him a number n and told him to invert the digits of that number such that number would become minimum. Inverting digit d means replacing it with digit 9 - d. And the final answer shouldn't start with zero. Can you help Chintu to find minimum number? ###Input: - First line will cont

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