Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82214 小徐老师 完美立方 Python3 Accepted 264 MS 3796 KB 421 2024-07-13 09:25:43

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) #print(round(a),a,round(a) - a , b, c, d) if 0 <= round(d) - d <= 0.00001 and round(d) >= c: print("Cube = {}, Triple = ({},{},{})".format(a, b, c, round(d)))