题解 | #简单错误记录#
简单错误记录
https://www.nowcoder.com/practice/2baa6aba39214d6ea91a2e03dff3fbeb
from re import S s0=[] d={} while 1: try: s=input().split('\\') # \表转义,\\表反斜杠符号 a=s[-1].split() s0.append(a[0][-16:]+' '+a[1]) except: break #print(s0) for i in s0: if i not in d.keys(): d[i]=s0.count(i) #print(d) item=list(d.items()) for i in item[-8:]: print(i[0],i[1])