import java.io.IOException;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.Scanner;
import java.util.Arrays;
import java.math.BigInteger;
class Main
{
public static final boolean DEBUG = false;
public static void main(String[] args) throws IOException
{
Scanner cin;
int n;
if (DEBUG) {
cin = new Scanner(new FileReader("d:\\OJ\\uva_in.txt"));
} else {
cin = new Scanner(new InputStreamReader(System.in));
}
while (cin.hasNext()) {
n = cin.nextInt();
if (n == 0) break;
BigInteger[] a = new BigInteger[n];
for (int i = 0; i < n; i++) {
a[i] = cin.nextBigInteger();
}
Arrays.sort(a);
for (int i = 0; i < n; i++) {
System.out.println(a[i].toString());
}
}
}
}
题目1190:大整数排序
最新推荐文章于 2021-09-13 21:57:01 发布