본문 바로가기
CS(Computer Science)지식/[C++][코딩 테스트] 자료구조 및 알고리즘

[C++] 백준 10871번: X보다 작은 수

by 엔지니어 청년 2025. 2. 22.
#include <iostream>
using namespace std;

int n, x;

int main()
{
	cin >> n >> x;
	
	int num;
	for (int i = 0; i < n; i++)
	{
		cin >> num;
		if (num < x) cout << num << ' ';
	}
}