n=int(input())
li=list(map(int,input().split()))
a=sorted(li)
for i in range(n):
print(a[i],end=' ')
输入:
5
8 3 6 4 9
输出:
3 4 6 8 9
n=int(input())
li=list(map(int,input().split()))
a=sorted(li)
for i in range(n):
print(a[i],end=' ')
输入:
5
8 3 6 4 9
输出:
3 4 6 8 9