赞
踩
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = scanner.nextInt(); } Arrays.sort(a); for (int i = a.length-1; i >= 0; i--) { System.out.print(a[i] + " "); } } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。