Commit 292ab75f by BellCodeEditor

save project

parent 6828d11d
Showing with 12 additions and 12 deletions
class Hero: import time
def __init__(self,name,hp,attack):
self.level=1 start_time = time.time()
self.name=name print("开始的时间:", start_time)
self.hp=hp for a in range(0, 1001):
self.attack=attack for b in range(0, 1001):
yase=Hero('yase',300,20) c = 1000-a-b
hy=Hero('hy',250,23) if a**2 + b**2 == c**2:
k=Hero('K',5600,199) print("a, b, c的值分别为:" , a, b, c)
print(yase.attack) end_time = time.time()
print(hy.attack) print("结束时间为:", end_time)
\ No newline at end of file \ 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