Commit 231d9c0d by BellCodeEditor

save project

parent 1d2a8dff
Showing with 9 additions and 10 deletions
import time alist = [12,43,65,87,90,25,76]
yyds=[] n=len(alist)
start_time = time.time() for j in range(n-1):
print("开始的时间为:", start_time) for i in range(n-1):
for i in range(0,1000000): if alist[i]>alist [i+1]:
yyds.append(i) alist[i],alist[i+1]=alist[i+1],alist [i]
print(yyds) print(alist)
end_time = time.time() \ No newline at end of file
print("时间为:", end_time-start_time)
\ 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