하루일문
[백준] 10816번 숫자 카드 2(파이썬) 본문
풀이
import sys
card_n = int(input())
card = list(map(int, sys.stdin.readline().split()))
M = int(input())
s_g = list(map(int, sys.stdin.readline().split()))
from collections import Counter
count = Counter(card)
for i in s_g:
if i in count:
print(count[i], end = " ")
else:
print(0, end = " ")
'algorithm > baekjoon' 카테고리의 다른 글
[백준] 1302번 베스트셀러 (파이썬) (0) | 2023.02.14 |
---|---|
[백준] 14227번 소트인사이드 (파이썬) (0) | 2023.02.14 |
[백준] 4963 섬의 개수(파이썬) (0) | 2023.02.13 |
[백준] 1260 DFS와 BFS(파이썬) (0) | 2023.02.13 |
[백준] 2108번 통계학(파이썬) (0) | 2023.02.12 |