How many doors?

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?

×

Problem Loading...

Note Loading...

Set Loading...