100 prisoners are in individual cells. In the prison courtyard, there is a interrogation room containing a single light bulb controlled by an ON/OFF toggle switch. The initial state of the light bulb is unknown (could be ON or OFF). At each discrete time step, the warden escorts one prisoner selected uniformly at random into the room. The prisoner may choose to toggle the switch or leave it as found. Any prisoner at any visit may declare: "All 100 prisoners have visited this room at least once." If the statement is correct, all go free; if wrong, all are executed.
Your Task
Constraints
Examples If each regular prisoner turns the bulb ON at most twice, the counter must log turn-offs.