There was a prison consisting of 1000 cells numbered from 1 to 1000.

- Each cell can be marked with ‘+’ or ‘-‘sign. Initially, all cells were marked with ‘-‘ sign.
- From days 1 to 1000,the jailor toggles marks on the cell from + to – or vice versa.
- On the i-th day ,the signs on cells that are multiples of i get toggled.
- Now in the process of verification on 1001-th day, all cells marked with + signs are opened.

Can you identify the cell numbers with ‘+’ sign?

**Solution:** Cell numbers are 1, 4 ,9, 16, 25, 36 and so on.

**Explanation:**

A cell gets toggled as many times as the number of divisor it has. For example let’s take cell number 20, it gets toggled on days 1, 2 ,4, 5, 10 and 20.

- Now we can see that divisors come in pairs like 20=1*20=2*10=4*5. We can see that total number of divisor is even. But this trend is not followed if the number is a perfect square.
- In perfect square , total number of divisors is odd. We see that cells are initially marked with – sign and only cell numbered as perfect square gets changed to + sign as it is having odd number of divisors.

These cells are** 1, 4 ,9, 16,25,36,49 and so on.**

This puzzle is contributed by **Ankur Chaudhary.** Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

## Recommended Posts:

- Puzzle | Toggling CCTV cameras in a museum
- Puzzle 24 | (10 Coins Puzzle)
- Puzzle 27 | (Hourglasses Puzzle)
- Puzzle 28 | (Newspaper Puzzle)
- Puzzle 29 | (Car Wheel Puzzle)
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle 33 | ( Rs 500 Note Puzzle )
- Puzzle 34 | (Prisoner and Policeman Puzzle)
- Puzzle 36 | (Matchstick Puzzle)
- Puzzle 38 | (Tic Tac Toe Puzzle)
- Puzzle 39 | (100 coins puzzle)
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Puzzle 81 | 100 people in a circle with gun puzzle
- Puzzle 85 | Chain Link Puzzle
- Puzzle | Elevator Puzzle
- Puzzle | 3 Priests and 3 devils Puzzle
- Puzzle | Man fell in well Puzzle
- Puzzle 15 | (Camel and Banana Puzzle)
- Puzzle 1 | (How to Measure 45 minutes using two identical wires?)
- Puzzle 2 | (Find ages of daughters)