there are n people, standing in a circle, first person have a gun, he kills the the person standing next to him, and passes the gun to the next living man, the person who recieves the gun, does the same, this is continued till 1 person in the circle stays alive with a gun. i want to know the number of the last man who is alive with the gun.
example; n=5, first guy kills the 2nd one and passes the gun to the 3rd guy, 3rd kills 4th and 5th recieves the gun, 5th kills the 1st and 3rd recieves the gun, 3rd kills 5th, so 3rd survives.
2007-10-07
21:53:54
·
6 answers
·
asked by
pieceof_iron
2