Alohomora
CodeChefOpen on judge ↗
Hermione, Harry, and Ron are at the entrance of the locked door in the flying key room. Of course, they try the age-old spell "Alohomora," but the door won't open. To open the door, they must use the key to the lock. The lock consists of $n$ disks. Each disk shows a digit from $0$ to $9$. Currently, the $i^{\text{th}}$ disk shows digit $s_i$, making a string $s = s_1 s_2 \ldots s_n$. When a disk
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