QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#773557#9578. 爱上字典laonongmin#RE 8ms11404kbPython3517b2024-11-23 09:21:532024-11-23 09:21:53

Judging History

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

  • [2024-11-23 09:21:53]
  • 评测
  • 测评结果:RE
  • 用时:8ms
  • 内存:11404kb
  • [2024-11-23 09:21:53]
  • 提交

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

output:


result: