| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67036 | 胡海峰老师 | 选择排序 | Python3 | Accepted | 259 MS | 3992 KB | 282 | 2024-03-13 09:47:49 |
n = int(input()) a = list(map(int,input().split())) """ 5 5 4 2 1 3 """ for i in range(n-1,0,-1): maxIdx = i for j in range(0,i): if a[j]>a[maxIdx]: maxIdx = j a[maxIdx],a[i] = a[i],a[maxIdx] b = [str(t) for t in a] print(' ' .join(b))