约瑟夫环的数学解
public class Solution {
public int LastRemaining_Solution(int n, int m) {
if(n==0||m==0){
return -1;
}
int lucker=0;
for(int i=2;i<=n;i++){
lucker=(m+lucker)%i;
}
return lucker;
}
}