题解 | #图片整理#自己写的比一行代码快10ms

图片整理

http://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941

# print(''.join(sorted(input())))
s = input()
dcount = {}
res = ''
for i in s:
    if i in dcount.keys():
        dcount[i] += 1
    else:
        dcount[i] = 1
lcode = sorted(dcount,key=lambda x:x[0])
for i in lcode:
    res += i*dcount[i]
print (res)
全部评论

相关推荐

迷茫的大四🐶:价格这么低都能满了?
点赞 评论 收藏
分享
评论
3
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务