Skip to content

Commit 686dce9

Browse files
committed
[23.01.25/Python] 숫자 카드2
1 parent adc6da5 commit 686dce9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Python_BOJ_2023/10816.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 숫자 카드2
2+
3+
n = int(input())
4+
arr1 = list(map(int, input().split()))
5+
m = int(input())
6+
arr2 = list(map(int, input().split()))
7+
8+
answer = dict()
9+
10+
for i in arr1:
11+
if i in answer:
12+
answer[i] += 1
13+
else:
14+
answer[i] = 1
15+
16+
for i in arr2:
17+
if i in answer:
18+
print(answer[i], end=' ')
19+
else:
20+
print(0, end=' ')

0 commit comments

Comments
 (0)