Switch Case
CodeChefOpen on judge ↗
Sagar has a bad habbit of playing with switches on switchboard. He likes to turn them on and off. One day he was irritating Akash with sound of the switch. To stop Sagar, Akash decided to give him a task, so that Sagar keeps busy with the task and does not bother him. The room in which Akash and Sagar are sitting has a fan. This fan has 2 switches to opearate. Akash gives the initial state of fa
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