Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67038 胡海峰老师 打印每一趟插入排序 Python3 Accepted 28 MS 3788 KB 267 2024-03-13 09:55:54

Tests(4/4):


Code:

n = int(input()) a = list(map(int,input().split())) """ 5 5 4 2 1 3 """ for i in range(1,n): next = a[i] j = i-1 while j>=0 and a[j]>next: a[j+1]=a[j] j-=1 a[j+1]=next b = [str(t) for t in a] print(' ' .join(b))