FIND THE SEQUENCE
CodeChefOpen on judge ↗
Naveen has a cypher made up of a sequence of n wheels, each with a digit ai written on it. On the i-th wheel, he made bi moves. Each move is one of two types: .up move (denoted by U): it increases the i-th digit by 1. After applying the up move on 9, it becomes 0. .down move (denoted by D): it decreases the i-th digit by 1. After applying the down move on 0, it becomes 9. Naveen knows the fina
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