py
2025-03-28 14:31:10
发布于:浙江
21阅读
0回复
0点赞
a = list(map(int,input().split(',')))
n = len(a)
for i in range(1,n):
temp = a[i]
j = i - 1
while j >= 0 and a[j] > temp:
a[j + 1] = a[j]
j -= 1
a[j + 1] = temp
print(a)
这里空空如也
2025-03-28 14:31:10
发布于:浙江
a = list(map(int,input().split(',')))
n = len(a)
for i in range(1,n):
temp = a[i]
j = i - 1
while j >= 0 and a[j] > temp:
a[j + 1] = a[j]
j -= 1
a[j + 1] = temp
print(a)
这里空空如也
提交答案之后,这里将显示提交结果~
有帮助,赞一个