题解 | #简单错误记录#
简单错误记录
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])