a291. nAnB problem
| From: [27.51.42.88]
|
發表日期:
2024-11-22 20:09
while True:
try:
ans=list(map(int, input().split()))
time=int(input())
for _ in range(time):
ges=list(map(int, input().split()))
a=0
b=0
box=[]
for x,y in zip(ans,ges):
if x==y:
a+=1
box.append(x)
for z in box:
while z in ges:
ges.remove(z)
ans_box=ans[:]
for i in ges[:]:
if i in ans:
ges.remove(i)
b+=1
print(f'{a}A{b}B')
o=input('')
if o=='':
pass
else:
o=False
except EOFError:
break
Traceback (most recent call last):
File "/15077955_a291/code_15077955.py", line 5, in
time=int(input())
ValueError: invalid literal for int() with base 10: '7 2 0 5'