Prisoners got freed

100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected more than once), into a special room with a light bulb and a switch which controls the bulb. No other prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb, turn off the bulb or do nothing. On any day, the prisoners can stop this process and say "Every prisoner has been in the special room at least once". If that happens to be true, all the prisoners will be set free. If it is false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a solution. How do they ensure they all go free?




Similar Riddles

Out of three Friends John, Jacob and Jonny one of them is a king, one is a bureaucrat, and one is a Spy.

The king always tells the truth, the bureaucrat always lies, and the Spy can either lie or tell the truth.

John says: Jonny is a bureaucrat
Jacob says: John is a king
Jonny says: I am a Spy

Tell me, Who is the king, who is the bureaucrat, and who is the Spy?

Asked by Neha on 03 Feb 2024


Baseball bat and ball cost $100. If the bat cost $99 more than the ball, what is the cost of each?

Asked by Neha on 23 May 2021

How is a fly different from a mosquito?

Asked by Neha on 15 Jul 2023


A research team went to a village somewhere between the jungles of Africa. Luckily for them, they reached the day when quite an interesting custom was to be performed. The custom was performed once a year as they confirmed and was performed in order to collect the taxes from every male of the region.

The taxes were to be paid in the form of grains. Everyone must pay pounds of grain equaling his respective age. This means a 20-year-old will have to pay 20 pounds of grain and a 30-year-old will pay 30 pounds of grain and so on.

The chief who collects the tax has 7 weights and a large 2-pan scale to weigh. But there is another custom that the chief can weigh only three of the seven weights.

Can you find out the weights of the seven weights? Also, what is the maximum age of the man that can be weighed for the payment of taxes?

Asked by Neha on 12 Jan 2025

The captain of a ship is telling you an interesting story and then poses a question. He says, “I have travelled the oceans far and wide. One time, two of my sailors were standing on opposite sides of the ship. One was looking west and the other one east. And at the same time, they could see each other clearly. Can you tell me how that was possible?”

Asked by Neha on 11 Jun 2025

Tarang football website was hacked by one of the players. Jack, the coach of Tarang has pointed out five players as the possible hacker.
Each suspected player made three statements from each suspected player and out of which two are true and one is false.

Joseph
A) I have not hacked the website.
B) I know nothing about hacking.
C) John did it.

Hazard
A) I have not hacked the website.
B) The website was attacked by one of the players.
C) I hate Shelly

Remy
A) I have not hacked the website.
B) I have never seen Oscar in my entire life.
C) I am sure John did it.

John
A) I have not hacked the website.
B) I am sure Oscar did it.
C) Joseph was lying when he said he did it.

Oscar
A) I have not hacked the website.
B) I am sure Hazard did it.
C) I used to be friend with Remy.

So who hacked the website?

Asked by Neha on 27 Jun 2021


When Jack was six years old he hammered a nail into his favourite tree to mark his height. Ten years later at age sixteen, Jack returned to see how much higher the nail was. If the tree grew by five centimetres each year, how much higher would the nail be?

Asked by Neha on 17 May 2021

There is a circular car race track of 10km. There are two cars, Car A and Car B. And they are at the exact opposite end to each other. At Time T(0), Both cars move toward each other at a constant speed of 100 m/seconds. As we know both cars are at the same speed they will always be the exact opposite to each other.
Note, at the center, there is a bug which starts flying towards Car A at time T(0). When the bug reaches car B, it turns back and starts moving towards the car A. The speed of bug is 1m/second. After 5 hours all three stop moving.
What is the total distance covered by the bug?

Asked by Neha on 03 Aug 2023

At my favorite fruit stand,
an orange costs 18,
a pineapple costs 27,
and a grape costs 15.
Using the same logic, can you tell how much a mango costs?

Asked by Neha on 13 May 2023


They are three errirs in this question. Can you find them?

Asked by Neha on 13 May 2025

Hot Articles

Amazing Facts

Crossword

The day before the 1996 U.S. presidential election, the NYT Crossword contained the clue “Lead story in tomorrow’s newspaper,” the puzzle was built so that both electoral outcomes were correct answers, requiring 7 other clues to have dual responses.