A king has servants. He ordered them to stand in a circle and numbered them from 1 to .
He gave to number 1 a sword and ordered him to kill the one next in number and pass the sword until only one left.
(1 kills 2 and passes to 3 and so on)
how many servants the king need to make the numbered servant to stay last?
Note : can be 1 but not 0
Take as a positive integer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
No explanations have been posted yet. Check back later!