Introduction - If you have any usage issues, please Google them yourself
Joseph used to solve the problem. Stack method. Josephus problem is a well-known problem: N individual circle, starting from the first report number, the first M months will be killed, what is left one, the others will be killed. For example, N = 6, M = 5, number of people being killed as 5,4,6,2,3. The last remaining No. 1.