题解 | #字符统计#
字符统计
http://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
while True:
try:
a = input()
b = dict.fromkeys(sorted(set(a)))
for i in range(len(b)):
m = list(b.keys())[i]
b[m] = a.count(m)
result = dict(sorted(b.items(),key=lambda x:x[1],reverse=True))
print(''.join(result.keys()))
except:
break