剑指offer python版 圆圈中最后剩下的数字 def aa(n,m): ret=0 if n==1: return 0 for i in range(2,n+1): ret= (m+ret)%i return ret print(aa(5,3))