题解 | #求解立方根#
求解立方根
http://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
import sys a = 1/3 for n in sys.stdin: n = float(n) if n > 0: print("%.1f"%(n**a)) else: print("-"+"%.1f"%((n-2*n)**a))三分之一次方就行了,反正用例都过了
求解立方根
http://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
import sys a = 1/3 for n in sys.stdin: n = float(n) if n > 0: print("%.1f"%(n**a)) else: print("-"+"%.1f"%((n-2*n)**a))三分之一次方就行了,反正用例都过了
相关推荐