QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#773780 | #9578. 爱上字典 | laonongmin# | Compile Error | / | / | C++23 | 289b | 2024-11-23 10:19:19 | 2024-11-23 10:19:20 |
Judging History
answer
s = input().lower().split()
s = [ss.strip('.!,?') for ss in s if ss.strip('.!,?')]
n = int(input())
lst = []
for i in range(n):
lst.append(input().lower().strip())
ans = 0
for ss in s:
if ss: # 检查字符串是否非空
ans += lst.count(ss) == 0
print(ans)
详细
answer.code:2:15: warning: multi-character character constant [-Wmultichar] 2 | s = [ss.strip('.!,?') for ss in s if ss.strip('.!,?')] | ^~~~~~ answer.code:2:47: warning: multi-character character constant [-Wmultichar] 2 | s = [ss.strip('.!,?') for ss in s if ss.strip('.!,?')] | ^~~~~~ answer.code:11:13: error: stray ‘#’ in program 11 | if ss: # 检查字符串是否非空 | ^ answer.code:1:1: error: ‘s’ does not name a type 1 | s = input().lower().split() | ^