import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while (in.hasNextLine()){ String str = in.nextLine(); if(str.isEmpty()){ break; } // 统计每个字符出现的次数 Map<Character,Integer> map = new HashMap(); for(char c: str.toCharArray()){ map...