← All problemsSign in

Number Lock

Jay recently found a large number lock with N number of wheels numbered from 1 to N. Each of these wheels contain the digits from 0 to 9 in a circular way. That is, 0 is followed by 1, 1 by 2 and so on 8 by 9 and 9 by 0 again. Initially all the wheels of the number lock are showing 0. Jay is just casually playing around with this lock. He sometimes moves all the wheels numbered from L to R (L R,

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