QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#795653#9578. 爱上字典RegtLu#RE 15ms10436kbPython3401b2024-11-30 22:47:152024-11-30 22:47:16

Judging History

你现在查看的是最新测评结果

  • [2024-11-30 22:47:16]
  • 评测
  • 测评结果:RE
  • 用时:15ms
  • 内存:10436kb
  • [2024-11-30 22:47:15]
  • 提交

answer

import sys
input=lambda:sys.stdin.readline().rstrip()

d=dict()
sentence=[x.lower() for x in input().replace(',','').replace('.','').replace('!','').replace(',','?').split()]
for w in sentence:
    if w not in d:
        d[w]=1
    else:
        d[w]+=1
input()
words=[x.lower() for x in input().split()]
all=sum([x[1] for x in d.items()])
for word in words:
    all-=d[word]
print(all)

详细

Test #1:

score: 100
Accepted
time: 15ms
memory: 10436kb

input:

I love Liaoning. Love Dalian!
1
love

output:

3

result:

ok single line: '3'

Test #2:

score: -100
Dangerous Syscalls

input:

Sulfox Loves Furry! Fur fur Furred.
2
anthropomorphic furry

output:


result: