BOJ10871 - x보다 작은수

CYSSSSSSSSS·2023년 6월 20일

알고리즘

목록 보기
33/83

문제10871

문제

  • 정수 N개로 이루어진 수열 A와 정수 X가 주어진다. 이때, A에서 X보다 작은 수를 모두 출력하는 프로그램을 작성하시오.
n,x = map(int,input().split())

nums = list(map(int,input().split()))
answer = []
for num in nums:
    if num < x:
        answer.append(num)

for ans in answer:
    print(ans , end = ' ')
profile
개발자 되고 싶어요

0개의 댓글