Commit c8db471d by BellCodeEditor

auto save

parent 33e24074
Showing with 8 additions and 11 deletions
import time alist=[22,33,43,2,342,32142,2665,4,55665,3423,2456,22342]
start_time=time.time() n=len(alist)
for a in range(0, 1000): for i in range(0,n-1):
for b in range(0, 1000): for j in range(0, n-1):
c=1000-a-b if alist[j]>alist[j+1]:
if a**2+b**2==c**2: alist[j],alist[j+1]=alist[j+1],alist[j]
print('a={},b={},c={}'.format(a,b,c)) print(alist)
end_time=time.time() \ No newline at end of file
sum_time=end_time-start_time
print('hrgfkasfh',sum_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