Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82217 小徐老师 完美立方 Python3 Accepted 303 MS 3792 KB 365 2024-07-13 09:27:37

Tests(10/10):


Code:

N = int(input()) for a in range(2, N + 1): for b in range(2, a): for c in range(b, a): x = a ** 3 - b ** 3 - c ** 3 if x < 0: break d = x ** (1 / 3) if 0 <= round(d) - d < 0.00001 and round(d) >= c: print("Cube = {}, Triple = ({},{},{})".format(a, b, c, round(d)))