If there are 100 doors and 100 people numbered from 1-100, and each of this person goes and CHANGES THE CURRENT STATE OF A DOOR (rules below),
i.e. , if a door is initially closed, one person will go and open it IF AND ONLY IF that door number is a multiple of the number allotted to him. Example, if all doors are initially closed, number 1 will go and open all of them. Then number 2 will go and close 2,4,6,8,... Then number 3 will go and close 3,9,15,... and open 6,12,18,... as 2 had closed them and so on.
At the end how many doors will be open if we assume that ALL DOORS WERE INITIALLY CLOSED?
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.
If a door is initially closed, that door number would need even number of factors so that the door's state would be changed even number of times to make its state finally closed.
eg. 2- 1 will come and open it, 2 will go and close it,
7- 1 will go and open it, 7 will go and close it.
50- 1 will go and open it, 2 will go and close it, 5 will go and open it, 10 will close it, 25 will open and finally 50 will close it. Similarly with other numbers.
Now think how many numbers from 1-100 have odd number of factors? The answer is all square numbers. Now, in 1-100 there are 10 square numbers, so the answer is simply 10.