不需要用numpy,直接用sort排序
```python
n,m=map(int,input().split())#这两个其实没用
lst=list(map(int,input().split()))
lst.sort()#排序
for i in lst:#遍历列表
print(i,end=" ")
```
by t20180435 @ 2024-01-07 20:57:21
赞同楼上。此代码对楼上代码进行了优化。
```python
input()
l = list(map(str, sorted(list(map(int, input().split())))))
print(' '.join(l))
```
by lby_commandBlock @ 2024-01-17 11:04:39