반응형
https://www.acmicpc.net/problem/2750
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
static BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer tokens;
static int N;
static int res[];
public static void main(String[] args) throws NumberFormatException, IOException {
N = Integer.parseInt(input.readLine());
res = new int[N];
for (int n = 0; n < N; n++) {
res[n] = Integer.parseInt(input.readLine());
}
Arrays.sort(res);
for (int n = 0; n < N; n++) {
System.out.println(res[n]);
}
}
}
반응형
'코딩테스트 > 백준문제' 카테고리의 다른 글
[Java] 백준_10828_스택 (0) | 2021.05.25 |
---|---|
[Java] 백준_10815_숫자카드 (0) | 2021.05.24 |
[Java] 백준_1920_수찾기 (0) | 2021.05.21 |
[Java] 백준_14501_퇴사 (0) | 2021.05.20 |
[Java] 백준_13458_시험감독 (0) | 2021.05.19 |