[Python P1116]鄙人有所不知,望请各位高手指点
查看原帖
[Python P1116]鄙人有所不知,望请各位高手指点
657540
Horizon208楼主2022/1/3 17:31

a=int(input()) b=list(map(int,input().split())) c=0 for d in range(a): for e in range(0, a-d-1): if b[e] > b[e+1] : b[e], b[e+1] = b[e+1], b[e] c=c+1 print(c)

结果:AC30%

2022/1/3 17:31
加载中...