목록1764 (1)
황소개발자
백준 1764 파이썬 python : 듣보잡 @@황소처럼 우직하게@@ strip 을 일상화하자^^
import sys input = sys.stdin.readline n, m = map(int, input().split()) not_hear = [] not_see = [] for i in range(n): not_hear.append(input().strip()) for i in range(m): not_see.append(input().strip()) duplicated = set(not_hear) & set(not_see) print(len(duplicated)) duplicated = sorted(list(duplicated)) for i in duplicated: print(i) 뭐 알고리즘 있을까 햇는데, 그냥 집합으로 구현. 그리고 strip 생활화^^
백준 문제 풀이
2020. 4. 21. 14:37