Math, asked by podu1965, 8 months ago

There are 1000 people sitting in a circular hall. A maniac enters the hall with a gun that holds 999 bullets. He goes on a killing spree but with a pattern. And the pattern is to kill every alternate person who is alive. He starts at seat number 1. What is the seat number you should be seated on to save yourself from this maniac and his killing spree?

Answers

Answered by krithavagrawal123
0

Answer:seat number two as he is going alternate

Step-by-step explanation:

Answered by naswthar2003
0

You might not understand if I give you the answer so follow this explanation

Step 1 : For a given value of N, find the “Power of 2” immediately greater than N. Let’s call it P

Step 2 : Subtract N from (P-1). Lets call it M, i.e, M = (P-1)- N

Step 3 : Multiply M by 2. i.e M*2

Step 4 : Subtract M*2 from P-1. Let’s call it ans, i.e, ans = (P-1) – (M*2)

So, the person with number will survive till last.

Similar questions