QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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)
Details
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() | ^