Jun-24-2023, 05:29 PM
Problem with completing the task.
good time of day. In the process of learning programming in the Python environment, I encountered the problem of incorrect calculation. The problem being solved, the refutation of the Euler hypothesis. the following code is written for the solution:
good time of day. In the process of learning programming in the Python environment, I encountered the problem of incorrect calculation. The problem being solved, the refutation of the Euler hypothesis. the following code is written for the solution:
for a in range(1, 150): for b in range(a, 150): for c in range(b, 150): for d in range(c, 150): e = ((a ** 5) + (b ** 5) + (c ** 5) + (d ** 5)) ** 0.2 if e == int(e): print(a, b, c, d, e, a + b + c + d + e) if e != int(e): print('NO')answer:
Output:"NO"
The result of code execution, no solution. But this is not true. After studying this topic, the required numbers were found. Put numbers in the code:a = 27 b = 84 c = 110 d = 133 e = (a ** 5) + (b ** 5) + (c ** 5) + (d ** 5) a = e ** (1 / 5) b = a ** 5 print(e, a, b )answer:
Output:61917364224 144.00000000000003 61917364224.00006
Wrong decision again, please explain what the error is. I can't figure out the problem without qualified help. Thank you in advance for an exhaustive answer!