题解 | #简单错误记录#

简单错误记录

https://www.nowcoder.com/practice/2baa6aba39214d6ea91a2e03dff3fbeb

ls = []
dic = {}
while True:
    try:
        msg = input().split()
        msg[0] = msg[0].split("\\")[-1]
        msg = " ".join([msg[0][-16:], msg[1]])
        if msg not in ls:
            ls.append(msg)
            dic[msg] = 1
        else:
            dic[msg] += 1
    except:
        break
for l in ls[-8:]:
    print(l, dic[l])

全部评论

相关推荐

迷茫的大四🐶:你这个拿去投央国企吧,投私企包过不了的
点赞 评论 收藏
分享
09-24 18:30
已编辑
长春工业大学 产品经理
小肥罗:HR就是好人的缩写哈哈哈哈
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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