''' 写复杂了,本质上是用set去重,再用字典记录每个字符的数量,排序后去掉最小的字符,有很多地方还可以优化 ''' x = input() x_list = list(x) x_set = set(x_list) x_dict = {} for i in x_set: x_dict[i] = x.count(i) x_key = dict(sorted(x_dict.items(),key=la...