题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
n=float(input()) temp=abs(n) for i in range(int(temp*1000)): if i**3<int(temp*1000) and (i+1)**3>int(temp*1000): if int(temp*1000)-i**3 < (i+1)**3-int(temp*1000): if n<0: print("-%.1f" % (i/10)) else: print("%.1f" % (i / 10)) else: if n < 0: print("-%.1f" % ((i+1)/10)) else: print("%.1f" % ((i+1)/10))