题解 | #简单错误记录#
简单错误记录
https://www.nowcoder.com/practice/2baa6aba39214d6ea91a2e03dff3fbeb
ls = [] c = [] while True: try: s1 = input().split('\\')[-1] s2 = s1.split() s3 = s2[0][-16:] s4 = s2[1] err = s3 + ' ' + s4 if err not in ls: ls.append(err) c.append(1) else: c[ls.index(err)] += 1 except: break for i in range(len(ls[-8:])): print(ls[-8:][i],c[-8:][i])