반응형
출처 : https://www.acmicpc.net/problem/2750
1. Problem

2. Code
<java />
import java.io.*;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
int[] nList = new int[N];
for (int i = 0; i < nList.length; i++)
nList[i] = Integer.parseInt(br.readLine());
Arrays.sort(nList);
for (int val : nList) {
System.out.println(val);
}
}
}
반응형
'알고리즘 > 백준' 카테고리의 다른 글
[정렬]2751번 수 정렬하기2 (0) | 2023.06.13 |
---|---|
[정렬]2587번 대표값2 (0) | 2023.06.12 |
[완전 탐색] 2839번 설탕배달 (0) | 2023.06.08 |
[완전탐색]1436번 영화감독 (0) | 2023.06.08 |
[완전탐색]1018번 체스판 다시칠하기 (0) | 2023.06.07 |