重写大神代码 public class Test08 { public static int ysfdg(int sum, int out, int count) { if(count == 1) return (sum + out - 1) % sum; else return (ysfdg(sum-1,out,count-1) + out) % sum; } } 总结 链表解法有待进一步地熟悉