更新
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import java.util.*;
|
||||
|
||||
public class P2840 {
|
||||
public static void main(String[] args) {
|
||||
Scanner in = new Scanner(System.in);
|
||||
List<Integer> nums = new ArrayList<>();
|
||||
while (in.hasNextInt()) nums.add(in.nextInt());
|
||||
Collections.sort(nums);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < nums.size(); i++) {
|
||||
if (i > 0) sb.append(' ');
|
||||
sb.append(nums.get(i));
|
||||
}
|
||||
System.out.println(sb.toString());
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
Reference in New Issue
Block a user