Introduction - If you have any usage issues, please Google them yourself
Joseph problem is a well-known problem: N personal circle, began to count off from the first, the M-th will be killed, the last remaining one, the rest will be killed. E.g. N = 6, M = 5, the number of the person to be killed 5,4,6,2,3. Finally, the rest of the 1st. Assuming K in circles for a good man, after K for the bad guys, your task is to determine the least M, so that all the bad guys get killed before the first good man.