我认识的一个大佬写的 超级简便 到现在我还没看懂 不多bb直接上代码 public static int test3(int n) { if(n ==1) return 0; return (test3(n-1)+3)%n; } public static void main(String[] args) { System.out.println(test3(100)+1); } **希望有大佬来给我指点一下 **