반응형
문제 설명
https://www.acmicpc.net/problem/1920
제출한 코드
import sys
N = int(sys.stdin.readline())
an = set(map(int, sys.stdin.readline().split()))
M = int(sys.stdin.readline())
am = list(map(int, sys.stdin.readline().split()))
for i in range(len(am)) :
if am[i] in an :
print(1)
else :
print(0)
결과

후기
반응형
'BQJ 백준 > python' 카테고리의 다른 글
[Python/파이썬] 백준 2420번: 사파리월드 (0) | 2024.06.15 |
---|---|
[Python/파이썬] 백준 2338번: 긴자리 계산 (0) | 2024.06.15 |
[Python/파이썬] 백준 1864번: 문어 숫자 (0) | 2024.06.14 |
[Python/파이썬] 백준 1834번: 나머지와 몫이 같은 수 (0) | 2024.06.14 |
[Python/파이썬] 백준 1547번: 공 (0) | 2024.06.14 |