A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the following. step 1: make sure all Cells are closed step2: reverse (if open, close; if close, open) those Cells whose numbers are divisible by 1 (in this step, all cells will be Opened); step 3: reverse those that are divisible by 2 (in this step, All even numbered cells will be closed); step 4: reverse those that are Divisible by 3; step 5: reverse those divisible by 4; step 6 to step 101: and so on . . . step 102: release the prisoners in those cells which are finally Open. How many prisoners will be released, and from which cells?
RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the follo...
Result: All those squares below 100 are set free. Like 4,9,16, 25, etc etc
Solution: If we start with a number, like 6, It has factors 2 & 3 which form a pair. So if the jail is set free with 2, it gets closed with 3. But if we take a squared number like 16, it has factors 2, 4, 8 which means that there is a single factor called 4 with which the result can be achieved.
RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the following. step 1: make sure all Cells are closed step2: reverse (if open, close; if close, open) those Cells whose numbers are divisible by 1 (in this s
10 prisoners will be freed. 1,4,9,16,25,36,49,64,81,100