题解 | 求解立方根
import math n = float(input().strip()) if n >= 0: print(round(math.pow(n,1/3),1)) else: i = round(math.pow(abs(n),1/3),1) i = -i print(i)
import math n = float(input().strip()) if n >= 0: print(round(math.pow(n,1/3),1)) else: i = round(math.pow(abs(n),1/3),1) i = -i print(i)
相关推荐