Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson12_diy01

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • pygame_lesson12_diy01
  • SB.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · b4182c9f
    BellCodeEditor committed 2 years ago
    b4182c9f
SB.py 354 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13
import time

start_time=time.time()
print("开始时间为:"+str(start_time))
for a in range(0,1001):
    for b in range(0,1001):
        c=1000-a-b
        if a**2+b**2==c**2 and a+b+c==1000:
            print(a,b,c)
stop_time=time.time()
print("结束时间为:"+str(stop_time))
t=stop_time-start_time
print("所用时间为:"+str(t))