MERGING RIVERS
CodeChefOpen on judge ↗
It's not the rivers that you might be thinking about. The question revolves around the concept of digital rivers. A digital river is a sequence of numbers where the number following n is n plus the sum of its digits. FOR EXAMPLE - 12345 is followed by 12360 since 1+2+3+4+5=15 and so 12345 + 15 gives 12360. - similarly 145 is followed by 155. If the unit's digit of a digital river is 'M' we wil
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