Yep you got it. I was going to ask the one with two switches next but I guess that is pointless now haha.

Yea I guess when asking it you can make a rule saying the prisoners can't take anything with them or leave anything behind. There are other variations too, I thought of one where the room has no switch and is completely empty except for a rock. Then instead of flipping a switch, they just put the rock against the wall or something and then the leader resets it by putting it in the middle of the room.

An elegant solution, but that's going to take a

*long* time to complete. You say that each prisoner is put in the switch room for an hour, right? Then the quickest the prisoners can be freed is after 98 hrs. I will win many, many lottery jackpots before that happens. I have calculated the expected time to completion of this process (until the leader asks the guards to set everyone free) and it's 2,674 hrs. That's 111 days and 10 hrs.

If the prisoners were willing to agree to even a

minimal amount of risk, they could be free much earlier. After 341 hrs (about 2 weeks), there's a 95% chance that they have all visited the switch room. Not worth risking death? I hear yah. After 422 hrs, it's a 99% chance. Gator-phobic? After 536 hrs., the odds are 1 in 1,000 that not everyone has been to the room.

650 hrs. = 1 in 10,000

764 hrs. = 1 in 100,000

878 hrs. = 1 in 1,000,000

1,000 hrs (still less than half of the expected time of the process) = 1 in 11,883,772

**One assumption that I made above that is not outlined in the original wording of the riddle is that as soon as one prisoner leaves the room, the next one's hour immediately begins. This is crucial to my "play the odds" strategy because the prisoners need to have some idea of how many of them have gone to the room in order to know when the roll of the dice will give them the odds that they desire. However, the more infrequent the visits, the longer it takes for that sure-thing process to work, and if just one prisoner (or the leader) gets transferred, paroled, or dies before changing the switch in the room, then they will all be in jail for life.