백준 Python 14425 문자열 집합

Seohyun·2023년 7월 29일

알고리즘

목록 보기
3/36

n, m = map(int, input().split())
words = set()
count = 0

for _ in range(n):
    words.add(input())
for _ in range(m):
    if input() in words:
        count += 1
    
print(count)
profile
Hail hamster

0개의 댓글