QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#773557 | #9578. 爱上字典 | laonongmin# | RE | 8ms | 11404kb | Python3 | 517b | 2024-11-23 09:21:53 | 2024-11-23 09:21:53 |
Judging History
answer
import string
# 获取输入并转换为小写,分割成单词列表
s = input().lower().split()
# 去除每个单词中的标点符号
s = [ss.translate(str.maketrans('', '', string.punctuation)) for ss in s]
# 获取需要排除的单词数量
n = int(input())
# 获取需要排除的单词列表
lst = []
for i in range(n):
lst.append(input().lower().strip())
# 计算不在排除列表中的单词数量
ans = 0
for ss in s:
if lst.count(ss) == 0:
ans += 1
print(ans)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 8ms
memory: 11404kb
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