-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path_2750.java
More file actions
45 lines (40 loc) ยท 747 Bytes
/
_2750.java
File metadata and controls
45 lines (40 loc) ยท 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package backjoon;
// https://www.acmicpc.net/problem/2750
// ์ ์ ๋ ฌํ๊ธฐ
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class _2750 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
// memory 12528 runtime 144
// ๋ฐฐ์ด์ ์ซ์ ๋ฃ๊ธฐ
int[] arr = new int[N];
for(int i=0; i<N; i++){
arr[i] = Integer.parseInt(br.readLine());
}
// ์ค๋ฆ์ฐจ์ ์ ๋ ฌ
Arrays.sort(arr);
// ์ถ๋ ฅ
for(int n : arr){
System.out.println(n);
}
}
}
/*
input
5
5
2
3
4
1
output
1
2
3
4
5
*/