It is lights-out time at the prison where 50 prisoners are locked in 50 cells. Not realizing the cells' doors are locked, a guard comes along and turns to key to each cell once, unlocking them all. Ten minutes later a second guard comes along and turns the keys of cells 2, 4, 6, and so on. A third guard does the same, stopping at cells 3, 6, 9... This carries on until 50 guards have passed the cells. How many prisoners can escape?
Look out for a pattern that will give you a shortcut to solving this problem.