Commit 4ed09028 by BellCodeEditor

save project

parent e27463f6
Showing with 8 additions and 13 deletions
import time
a=time.time()
print('开始时间是:',a)
for an in range(0,1001):
for b in range(0,1001):
c=1000-a-b
if an**2+b**2==c**2 :
print('an,b,c的值分别为:',an,b,c
e=time.time()
print('结束时间为:',e)
f=e-a
print('总共耗时:',f)
\ No newline at end of file
alist=[8562486,4,14789459784,715,15,8,10,20,17,9,13,8,6]
n=len(alist)
for i in range(0,n- 1):
for j in range(0,n-1):
if alist[j]>alist[j+1]:
alist[j],alist[j+1]=alist[j+1],alist[j]
print(alist)
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