import java.util.Scanner; /** * Created by Admin on 2017/3/25. */ public class test01 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n=1; while (n !=-1){ n = scanner.nextInt(); int min = 1, max = 1, sum = 1;
题目: 比如输入为aaabbc,输出a3b2c1 完整解答: public class Other { static String func(String str) { StringBuffer result = new StringBuffer(); if (str.length() == 1) { result.append(str.charAt(0)); result.append('1'); return result.toString(); } else { // string len