728x90
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
try {
int a = Integer.parseInt(buffer.readLine());
int[] array = new int[a];
for(int i = 0 ; i< a ; i++) {
array[i] = Integer.parseInt(buffer.readLine());
}
buffer.close();
Arrays.sort(array);
for(int i = 0; i< a; i++) {
sb.append(array[i]).append("\n");
}
System.out.println(sb);
} catch (NumberFormatException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
728x90
'PS > BaekJoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
11650 JAVA ์ขํ ์ ๋ ฌํ๊ธฐ (0) | 2022.07.12 |
---|---|
1427 JAVA ์ํธ์ธ์ฌ์ด๋ (0) | 2022.07.08 |
2751 JAVA ์ ์ ๋ ฌํ๊ธฐ 2 (0) | 2022.07.03 |
2675 JAVA ๋ฌธ์์ด ๋ฐ๋ณต (0) | 2022.06.30 |
10950 JAVA A+B - 3 (0) | 2022.06.30 |