题解 | #字符统计#
字符统计
https://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
s = input()
dic = {}
for i in s:
if i not in dic:
dic[i] = 1
else:
dic[i] += 1
sortdic = sorted(sorted(dic.items(), key = lambda x:x[0]), key = lambda y:y[1], reverse = True)
#print(sortdic)
result = ''
for i in sortdic:
result += i[0]
print(result)

