1、第一题: 100%找了一下规律,如下:定义 long max = (n + 1) / 21~1: 1-11~2: 1-2 2-11~3:1-1 2-2 3-11~4:1-1 2-2 3-2 4-11~5:1-1 2-2 3-3 4-2 5-11~6: 1-1 2-2 3-3 4-3 5-2 6-1if(kelse if(n%2==0) sout(max-(k-max-1))else sout(max(k-max))2、第二题 60% String str = in.next(); int length = str.length(); char[] chs = str.toCharArray(); for(int i = 0; i char end = chs[length - 1]; chs[length - 1] = chs[i]; for(int j = i; j chs[length - 2] = end; } String result = new String(chs); System.out.print(result);3、第三题:想起来了JJ的“总是学不会 再聪明一点~”#百度#