본문 바로가기
휴지통/알고리즘 & 자료구조

백준 10871

by 신재권 2021. 7. 2.
import java.util.Scanner;


public class Main10871 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] A = new int[N];
		for(int i=0; i<A.length;i++){
			A[i] = sc.nextInt();
		}
		for(int i=0; i<A.length; i++){
			if(X > A[i]){
				System.out.print(A[i]+" ");
			}
		}

	}

}

 

'휴지통 > 알고리즘 & 자료구조' 카테고리의 다른 글

백준 11022  (0) 2021.07.02
백준 11021  (0) 2021.07.02
공간복잡도(Space Complexity)  (0) 2021.07.02
힙(heap) (2)  (0) 2021.07.02
힙(Heap)  (0) 2021.07.01