You are trapped in a room with two doors. One leads to certain death and the other leads to freedom. You don't know which is which.
There are two robots guarding the doors. They will let you choose one door but upon doing so you must go through it.
You can, however, ask one robot one question. The problem is one robot always tells the truth, the other always lies and you don't know which is which.
What is the question you ask?
A thief enters a store and threatens the clerk, forcing her to open the safe. The clerk says, “The code for the safe is different every day, and if you hurt me you’ll never get the code.†But the thief manages to guess the code on his own. How did he do it?