模拟经典的约瑟夫环(Josephus Problem)问题
轮次: 0
剩余人数: 0
最近淘汰: -
最终幸存者编号:
约瑟夫环问题公式推导:
f(n,m) = (f(n-1,m) + m) % n
f(1,m) = 0
其中结果需要+1转为1-n的编号