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  >  Infosys  >  Challenging Puzzles
Go To First  |  Previous Question  |  Next Question 
 Challenging Puzzles  |  Question 2 of 200    Print  
A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the following.
step 1: make sure all Cells are closed
step2: reverse (if open, close; if close, open) those Cells whose numbers are divisible by 1 (in this step, all cells will be Opened);
step 3: reverse those that are divisible by 2 (in this step, All even numbered cells will be closed);
step 4: reverse those that are Divisible by 3;
step 5: reverse those divisible by 4;
step 6 to step 101: and so on . . .
step 102: release the prisoners in those cells which are finally Open. How many prisoners will be released, and from which cells?

  
Total Answers and Comments: 11 Last Update: June 02, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
May 26, 2005 02:26:16   #1  
Test        

RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the follo...
Result: All those squares below 100 are set free. Like 4,9,16, 25, etc etc 
 
Solution: If we start with a number, like 6, It has factors 2 & 3 which form a pair. So if the jail is set free with 2, it gets closed with 3. But if we take a squared number like 16, it has factors 2, 4, 8 which means that there is a single factor called 4 with which the result can be achieved.

 
Is this answer useful? Yes | No
August 08, 2005 21:22:09   #2  
raj_893        

RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the follo...
correct! the logic is all numbers having odd no. of factors will be opened........all squares have odd no. of factors 
 

 
Is this answer useful? Yes | No
September 01, 2005 02:45:25   #3  
francis        

RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the follo...
ans 9
 
Is this answer useful? Yes | No
September 24, 2005 02:01:59   #4  
samhita        

RE: A jail has 100 cells, numbered 1 to 100. The king ...
3
 
Is this answer useful? Yes | No
September 29, 2005 09:25:09   #5  
Nitika Gupta        

RE: A jail has 100 cells, numbered 1 to 100. The king .......

The even numbered cells will be open and odd numbered cells will be closed.


 
Is this answer useful? Yes | No
September 29, 2005 14:21:12   #6  
ravi        

RE: A jail has 100 cells, numbered 1 to 100. The king ...

The answer is 1**2 , 2**2 , 3**2 4**2 5**2 6**2 e.t.c

i.e 1,4,9,16,25,36,49,64,81,100


 
Is this answer useful? Yes | No
March 20, 2006 10:13:16   #7  
kumar        

RE: A jail has 100 cells, numbered 1 to 100. The king ...

1)all closed

2)all opened(100)

3)50 opened(odd) and 50 closed(even)

4)17 closed(odd),33 opened(odd) & 16 opened(even),34 closed(even)

5)17 closed(odd),33 opened(odd) & 8closed,8opened,17 closed,17 opened

therefore 33+8+17=58 opened.....so obviously 58 out of 100 will be released..


 
Is this answer useful? Yes | No
April 12, 2006 06:44:55   #8  
Sonali Panda        

RE: A jail has 100 cells, numbered 1 to 100. The king ...

2.All wiil b Open

3.50 wiil b open ,50 wiil b closed

4.as the no divisible by 2 is not divisible by 3(50 remain open)+33 will be open,ie 83

5.no divisible by 2 will b divisible by 4 =25,so 25 will b closed,so 83-25=58 will b opened

6 to 101 the same,so in 100 times 58 will be open,101(opposite of100),so 42 will be opened,so 102 58 will be opened

ANS:-58 person will be released


 
Is this answer useful? Yes | No
July 30, 2006 12:52:42   #9  
S.KANNAN        

RE: A jail has 100 cells, numbered 1 to 100. The king ...
ans is 10 (not 9)i am sure the cell no 1 is open in step 2 and is still b open upto last step.so tat is also included.ans is 10 i am sure about tat
 
Is this answer useful? Yes | No
May 28, 2008 01:51:00   #10  
vidi56 Member Since: May 2008   Contribution: 1    

RE: A jail has 100 cells, numbered 1 to 100. The king Declares some sort of amnesty and orders the following. step 1: make sure all Cells are closed step2: reverse (if open, close; if close, open) those Cells whose numbers are divisible by 1 (in this s
10 prisoners will be freed.
1,4,9,16,25,36,49,64,81,100

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape