Description: The problem of Joseph (Josephus Problem) said that the famous Jewish historian Josephus had the following story: in the Romans occupied Qiaotapate, 39 Jews and Josephus and his friends hid in a hole, 39 Jews, the decision would rather die Do not be an enemy to, and decided a means of suicide, 41 individuals arranged in a circle by an individual number off each number off to the third person that the person must commit suicide, and then re-reported the number of the next until all have committed suicide, killed so far. However, Josephus and his friends do not want to comply with Josephus, to be the first to pretend to comply with his friends, he will be friends with their own arrangements in the 16 and 31 position, then escaped the death game. The original question: the user to enter M, N value, N, surrounded by a ring from No. 0 people began to count, count to M, that person will quit the game until the last person to ask the last one the rest of the people is ?
To Search:
File list (Check if you may need any files):
Josephus Problem.doc