题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
n = input() fuc1 = lambda x:round(x ** (1/3),1) num = abs(float(n)) if n[0] == '-': s1 = "-" + str(fuc1(num)) print(float(s1)) else: print(fuc1(num))
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
n = input() fuc1 = lambda x:round(x ** (1/3),1) num = abs(float(n)) if n[0] == '-': s1 = "-" + str(fuc1(num)) print(float(s1)) else: print(fuc1(num))
相关推荐