There are 40 doors marked with numbers 1 to 40. There are 40 individuals marked 1 to 40.
An operation on a door is defined as changing the status of the door from open to closed or vice versa. All the doors are closed to start with. One at a time, one randomly chosen individual goes and operates the doors. The individual however operates only those doors which are a multiple of the number he/she is carrying. For example, the individual marked with number 5 operates the doors marked with 5, 10, 15, 20, 25, 30, 35, and 40. If every individual in the group gets one turn, then how many doors are open at the end?  Options:
A) 3
B) 4
C) 5
D) 6
E) 7

Rationale: if a door is closed at the start , it requires an odd number of people to operate to be open at the end . only the perfect squares have an odd number of factors . the doors which are open at the end are : 1 , 4 , 9 , 16 , 25 , 36 for a total of 6 doors . the answer is d .
Answer: D