Run ID:73299

提交时间:2024-05-18 16:21:20

results = [] for a in range(1, 101): for b in range(a, 101): c = (a**2 + b**2)**0.5 if int(c) == c and c <= 100: result = (a, b, int(c)) if result not in results and (b, a, int(c)) not in results: results.append(result) for result in sorted(results): print(' '.join(str(num) for num in result)) print(len(results))