1 import java.util.Arrays; 2 import java.util.Scanner; 3 4 public class Main{ 5 public static void main(String[]args){ 6 Scanner in=new Scanner(System.in); 7 int n=0; 8 int[]nums=null; 9 while(in.hasNext()){ 10 n=in.nextInt(); 11 nums=new int[n]; 12 for(int i=0;i<n;i++) 13 nums[i]=in.nextInt(); 14 Arrays.sort(nums); 15 for(int x:nums) 16 System.out.print(x+" "); 17 System.out.println(); 18 } 19 } 20 } 21 /************************************************************** 22 Problem: 1202 23 User: 0000H 24 Language: Java 25 Result: Accepted 26 Time:940 ms 27 Memory:81200 kb 28 ****************************************************************/
时间: 2024-10-22 06:05:29