Well, that's quite simple...
You should pick the last multiple of 2 from the ammount of people in the circle.
The first will always be removed when the ammount of people is equals a multiple of 2... when the number of people is one more than a multiple of 2, the third will be removed, always the odds, exactly on that order...
eg:
71 people
last multiple of two is 64.
when I subtract 64 from 71 I will have 7 people... so I will multiply by two = 14 now we only need to add one to convert from programmer numbers to human numbers...
14+1 = the 15ยบ person on the circle will be removed.
Built With
- logic
- math

Log in or sign up for Devpost to join the conversation.