#include <iostream> using namespace std; int main() { double accu = 1e-3; double l = -20, r = 20; double x; cin >> x; double mid = 0; while (abs(r - l) > accu) { // 注意 while 处理多个 case mid = (l + r) / 2; if (mid * mid * mid < x)l = mid; else r = mid; } printf("%.1lf\n", mid); } // 64 位输出请用 printf("%lld")