题解 | 简单错误记录

简单错误记录

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

def a_1():
    from collections import Counter
    list0=[]
    while True:
        try:
          a,b=input().strip().split()
          list0.append(a.split("\\")[-1][-1:-17:-1][::-1].strip()+' '+b)
        except:
            break
    dict2=dict(Counter(list0))
    list2=[]
    for (k,v) in dict2.items():
        list2.append(k+' '+str(v))
    for i in list2[-1:-9:-1][::-1]:
        print(i)
if __name__=='__main__':
    a_1()

全部评论

相关推荐

溱元:前端每年固定死几次,看两集广告就复活了
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
11-10 11:42
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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