Run ID:82214

提交时间:2024-07-13 09:25:43

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)))