江屹山 • 1个月前
import math
def bb(limit):
for a in range(1, limit + 1):
for b in range(a + 1, limit + 1):
c = int(math.sqrt(a**2 + b**2))
if c <= limit and a**2 + b**2 == c**2:
print(a,b,c)
bb(100)
哪里错了,大家有时间帮我看看
评论: