GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Cognizant

 Print  |  
Question:  there are 1000 doors that are of the open-close type. When a person opens the door he closes it and then opens the other. When the first person goes he opens-closes the doors ion the multiples of 1 i.e., he opens and closes all the doors. when the second goes he opens and closes the doors 2, 4 6 8 resly. Similarly when the third one goes he does this for 3 6 9 12 15th doors resly. Find number of doors that are open at last.




February 02, 2006 06:58:11 #2
 Sarada   Member Since: Visitor    Total Comments: N/A 

RE: there are 1000 doors that are of the open-close ty...
 

Ans: 334

  • For Every 30 doors 10 doors will be left open(as mutilpes of 2 and mutilples of 3 are only closed remaining numbers will be 10).
  • So like that for every 300 doors 100 doors willbe left open.
  • For 900 doors 300 doors willbe left open.
  • And in the remaining 100 doors 34 doors willbe left open(as for 30 doors 10 doors are left open,so for 90 doors 3o doors will be left open and among the remaining 10 doors 4 doors are left open).
  • Total will be 334 doors are left open.
     

 

Back To Question