728x90
출처-https://www.acmicpc.net/problem/10871
728x90
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
int x=scan.nextInt();
int a[]=new int[n];
for (int i=0;i<n;i++)
a[i]=scan.nextInt();
for (int i=0;i<n;i++) {
if (a[i]<x)
System.out.print(a[i]+" ");
}
System.out.println();
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 10953] A+B - 6 (java) (0) | 2020.08.21 |
---|---|
[백준, BOJ 1110] 더하기 사이클 (java) (0) | 2020.08.21 |
[백준, BOJ 15552] 빠른 A+B (java) (0) | 2020.08.21 |
[백준, BOJ 2884] 알람 시계 (java) (0) | 2020.08.20 |
[백준, BOJ 14681] 사분면 고르기 (java) (0) | 2020.08.20 |