C++ 代码
#include<iostream>
using namespace std;
int main()
{
double n,down=-1e4,up=1e4,mid;
scanf("%lf",&n);
while(up-down>1e-8){
mid=(down+up)/2;
if(mid*mid*mid>=n)up=mid;
else down=mid;
}
printf("%lf\n",down);
return 0;
}