JAVA 代码
import java.util.Scanner;
import java.io.BufferedInputStream;
public class Main {
//程序入口
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedInputStream(System.in));
double n = in.nextDouble();
double l = -10000;
double m = 10000;
while(m - l > 1e-8){
double mid = (m + l) / 2;
if(mid * mid * mid >= n)
m = mid;
else
l = mid;
}
System.out.println(String.format("%.6f", l)); // 保留 6位小数
}
}