题解 | #字符统计#
字符统计
https://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
import sys
n = input()
dic = {}
for x in n:
dic[x] = dic.get(x,0) + 1
n1 = sorted(dic.items(), key = lambda x:(x[1],-ord(x[0])),reverse=True)
for i in n1:
print(i[0],end='')
