题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
n = float(input()) a = 0.0 if n>=0: while a*a*a<=n: a += 0.01 print(round(a,1)) else: n = -n while a*a*a<=n: a += 0.01 print(round(-a,1))
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
n = float(input()) a = 0.0 if n>=0: while a*a*a<=n: a += 0.01 print(round(a,1)) else: n = -n while a*a*a<=n: a += 0.01 print(round(-a,1))
相关推荐