题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
num=float(input()) a=abs(num) x1=0 x2=3 while True: x=(x1+x2)/2 if abs(x**3-a)<=0.1: if num<0: print('{:.1f}'.format(float(-x))) else: print('{:.1f}'.format(float(x))) break elif x**3-a>0.1: x2=x else: x1=x