题解 | #求解立方根#
求解立方根
https://www.nowcoder.com/practice/caf35ae421194a1090c22fe223357dca
line = input(''); range = -20:0.1:20; err1 = 1; num = 0; for jj = 1 : length(range) err = abs(line - range(jj)*range(jj)*range(jj)); if err < err1 err1 = err; num = jj; end end printf("%d\n",range(num));