← All problemsSign in

TNP CHALLENGE 502

Due to the lockdown imposed as a result of the pandemic, Ramu is forced to stay in his home. For passing time he started playing with numbers.Interestingly, he found out a new pattern. He takes a 4-digit number (with at most 3-digits repeating), writes the largest and smallest number that can be obtained by rearranging the digits of that 4-digit number, finds the difference between the largest and

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