One of the most famous riddles about guardians who tell the truth or lie. The usual trap is to try to figure out who is who before asking. There is a more elegant way.
The guardians of the two doors
Riddle statement
You are faced with two doors: one leads to the exit and the other to perdition. Next to them are two guardians. One always tells the truth and the other always lies, but you don't know which is which.
You can ask one of the guardians a single question. What questions to safely choose the right door?