500 people standing in a circle in an order 1 to 500. No. 1 has a sword. He kills the next person (i.e. No. 2) and gives the sword to the next (i.e. No. 3). All people do the same until only 1 survives. Which number survives at the last?
There are 500 people starting from 1 to 500.
Answers
Answer:489th man will survive only.
Step-by-step explanation:
In this puzzle,
Step 1:
Find the lowest power of 2 > n
Where n is given number of people =500
2^9=512 Let's call it P
Step 2 :
Subtract n from (P-1). Lets call it Q,
Q = (P-1)- n , as: Q= (512 -1) - 500 =11
Step 3 :
Multiply Q by 2. as: 11×2 =22
Step 4 :
Subtract Q×2 from P-1 and you will find the person with number “ans” will survive till last.
as: (512 - 1) - 11×2
=511-22= 489 = ans.
Only the 489th man will live.
We solve the following by these steps:
Step 1: Determine the lowest power of 2 > n, where n is the number of persons =500 291=512. Let's call it P for short.
Step 2: Subtract n from the total (P-1). Let's call it Q, and define it as Q = (P-1)-n, as in Q= (512 -1) - 500 =11.
Step 3: Multiply Q by 2 (e.g 112 = 22).
Step 4: Then you subtract Q2 from P-1, and you'll notice that the individual with the number will be the last one standing.
Hence the answer comes as : (512 - 1) - 112 =511-22 = 489
#SPJ2