Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67099 张智博 打印每一趟冒泡排序 Python3 Wrong Answer 28 MS 3752 KB 220 2024-03-13 21:47:26

Tests(0/3):


Code:

n = int(input()) a = list(map(int,input().split())) for i in range(n-1): for j in range(n-i-1): if a[j] > a[j+1]: a[j],a[j+1],a[j] b = [str(x)for x in a] print(''.join(b)) #Jacky


Run Info:

------Input------
5 5 4 3 2 1
------Answer-----
4 3 2 1 5 3 2 1 4 5 2 1 3 4 5 1 2 3 4 5
------Your output-----
54321 54321 54321 54321