본문 바로가기
004 컴퓨터과학/알고리즘

[백준 온라인저지] 정렬 알고리즘 / 1920. 수 찾기

by Dallas 2023. 6. 3.
반응형

문제

예제

 

소스코드

시간 : 192ms

n = int(input())
numbers = list(map(int, input().split()))
m = int(input())
target = list(map(int, input().split()))

numberHash = {}
for x in numbers :
    numberHash[x] = True
for y in target :
    if numberHash.get(y) == True :
        print(1)
    else :
        print(0)
반응형

댓글