-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoj2751.java
More file actions
26 lines (23 loc) · 750 Bytes
/
Boj2751.java
File metadata and controls
26 lines (23 loc) · 750 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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
public class Boj2751 {
public static void main(String[] args) throws NumberFormatException, IOException {
List<Integer> list = new ArrayList<Integer>();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int N = Integer.parseInt(br.readLine());
for(int i=0; i<N;i++) {
list.add(Integer.parseInt(br.readLine()));
}
Collections.sort(list);
for(int i=0; i<list.size();i++) {
sb.append(list.get(i)).append("\n");
}
System.out.println(sb);
}//main
}//class