题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
#硬解 while True: try: n = float(input()) dict = {} for i in range(-200,201): d = abs((i/10)**3 - n) dict[i/10] = d a = min(dict, key=dict.get) print("%.1f"%a) except: break