题目: 比如输入为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