import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextInt()) { //控制多输入,不要用true,ctrl+D结束
int n = sc.nextInt();
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
int num = sc.nextInt();
arr[i] = num;
}
for (int i = 0; i < n; i++) { //冒泡排序
for (int j = 0; j < n - 1 - i; j++) {
if (arr[j] > arr[j + 1]) {
int temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
for (int i = 0; i < arr.length; i++) {
if(i!=arr.length-1){
System.out.print(arr[i] + " ");
}else{
System.out.println(arr[i] + " ");
}
}
}
}
}
0.0分
1 人评分