This commit is contained in:
2025-12-28 21:05:06 +08:00
parent 5d09b15326
commit bdaedc135e
46 changed files with 485 additions and 38 deletions
@@ -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