QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#795657 | #9578. 爱上字典 | RegtLu# | RE | 15ms | 10508kb | Python3 | 411b | 2024-11-30 22:50:28 | 2024-11-30 22:50:28 |
Judging History
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=list(set([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: 10508kb
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