| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128126 | 江屹山 | 勾股数 | Python3 | Compile Error | 0 MS | 0 KB | 390 | 2025-08-02 17:24:45 |
import math def find_pythagorean_triplets(limit): print(f"{'':>4} {'':>4} {'':>4}") 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) # 查找100以内的所有勾股数 find_pythagorean_triplets(100)
File "Main.py", line 4
print(f"{'':>4} {'':>4} {'':>4}")
^
SyntaxError: invalid syntax