题解 | #HJ19 简单错误记录#
简单错误记录
http://www.nowcoder.com/practice/2baa6aba39214d6ea91a2e03dff3fbeb
let obj = {}
let str
while ((str = readline())) {
const [c, n] = str.split(' ')
const s = c.slice(c.lastIndexOf('\\') + 1).slice(-16)
obj[`${s} ${n}`] = (obj[`${s} ${n}`] || 0) + 1
}
Object.keys(obj)
.slice(-8)
.forEach(el => {
print(`${el} ${obj[el]}`)
})