https://www.acmicpc.net/problem/10871
import sys N,M = map(int, sys.stdin.readline().split()) arr = list(map(int, sys.stdin.readline().split())) for i in range(N): if arr[i] < M: print(arr[i], end=" ")
반복문(for) 써보기