Last night, I started to read the beauty of programming. I just saw an interview question in the preface. It is said that most of the early candidates for the PM position encountered this question:
There are three lights in the room, and three switches outside the room control the three lights respectively. Only when you enter the room can you see which one is on. Excuse me, how can I enter the room only once and specify which switch controls which light.
I have an idea and have not read the online answer:
Switch a switch to the on status for 10 minutes. Then, switch the switch to the off status. Then, switch the status of another switch to open, and then quickly enter the room.
The current light must be switched on and off. Next, touch the light bulb with your hands. The light bulb is under the control of the switch in the "on" status, and the remaining one is exactly matched.
Here, the temperature is usedArticle~
Well, I can't help searching the Internet. Is there any other solution? The result is that the temperature is drilled down. Well, if the conditions are met: all three are cold lights, is there a solution? I did not expect it!