Commit 55f1b241 by BellCodeEditor

save project

parent 82962491
Showing with 17 additions and 2 deletions
alist = [88, 75, 72, 82, 90, 85, 78, 91] import time
\ No newline at end of file q = time.time()
qwe=[12,34,68,36,86,89,5,3,7,85,78,4,45,34,567,97,36,97,37,56.347874,435,76,2,7,4,34,4556,3456,5646,5,67657657,55665765,85675765,7,6,65,65,75,765,756,7,5,756,5678,865,78,655,7,856,45,86,57,55,7,65,5,657,5,7,3,75,75,7,6765,7,575,75,75,75,7,75,765,75,75,7,7,6,67,88,9,9,86,54,3,2,2,5,79,9,6,4,34,6,89,9,8,2,665,5]
qwer=len(qwe)
#############################p表示第几轮排序
for p in range(0,len(qwe)-1):#
qwer-=1
#############################j表示qwe的索引下标
for a in range(0,len(qwe)-1):
#比较大小并交换
if qwe[a] > qwe[a+1]:
qwe[a],qwe[a+1]=qwe[a+1],qwe[a]
print(qwe)
w = time.time()
e = w-q
print(e)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment