题解 | #删除字符串中出现次数最少的字符#

删除字符串中出现次数最少的字符

http://www.nowcoder.com/practice/05182d328eb848dda7fdd5e029a56da9

while True:
    try:
        d={}
        n=input()
        for i in n:
            if i in d:
                d[i]+=1
            else:
                d[i]=1
        a=min(d.values())
        for i in n:
            if d[i] == a:
                n=n.replace(i,"")
        print(n)
    except:
        break
全部评论
为什么都要加入while true
点赞 回复 分享
发布于 2022-05-25 22:12

相关推荐

那么好了好了:他本来公司就是做这个的,不就是正常的游戏客户端和服务器开发,软硬件联动,有啥恶心不恶心的,提前告诉你就是怕你接受不了,接受不了就没必要再往后走流程浪费时间,虽然这公司是一坨。
点赞 评论 收藏
分享
05-01 22:41
中南大学 Java
点赞 评论 收藏
分享
评论
7
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务