1000 Prisoners in a cell

There are 1000 cells in a prison.Each cell has a prisoner. When i divide all the cell by a number (starting with 1 to 1000) and if the remainder is 0, then the door will be inverted (i.e. if it's close then it will open or vice versa). When i keep those cells on dividing till 1000, at last how many cells will be opened? Initially all doors are closed..... Let's take an example:- if i divide all the cells(1 to 1000) by 1,then remainder will be 0 for all cells. Therefore every cell will open.Now, if i divide again by 2 then only even number's cell will close.I continue this process till 1000...How many cells are open????


The answer is 31.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Rohit Sachdeva
Aug 18, 2014

A cell will remain open if it has been switched odd number of times.

Any number (prime or not) can be written as product of 2 different numbers.

Let's take example of 12: 12=1x12 =2x6 =3x4

So 12 will switch 6 times on: 1, 2, 3, 4, 6, 12

But we can notice that square numbers will switch odd times. Say

36=1x36 =2x18 =3x12 =4x9 =6x6

So 36 will switch 9 times on: 1, 2, 3, 4, 6, 9, 12, 18, 36

Between 1&1000, 31 squares are there (31²=961)

So answer=31

Jaiveer Shekhawat
Aug 23, 2014

the answer will again be hidden with the reserves of squares. thus the perfect square,x such that x^{2}<1000 will be the answer.

thus x=31 (a feedback from my side- plz don't repeat the same questions with different stories)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...