problem:
when x^(x^5) = n, 1 <= n <= 10^8, and n∈Z
ask x.(sepcial judge)
example:
input: 1000000;
output: 1.86000448
—————————————————————
solution:
目标值 = int(input())
def f(h):
return h ** (h ** 5)
左, 右, 误差 = 1.0, 2.0, 10 ** (-8)
while 右 - 左 > 误差:
中 = (左 + 右) / 2.0
y = f(中)
if y < 目标值: 左 = 中
else: 右 = 中
print(中)
—————————————————————
Thinking:
Is this solution right?
Can you write another solution?
—————————————————————