백준 #10871번 X보다 작은 수

jhj·2024년 1월 31일

백준 JAVA

목록 보기
51/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int x = sc.nextInt();
		
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			if(a < x) {
				System.out.print(a + " ");
			}
		}
		
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글