$\huge \color{orange}{成仙之路->}$ $\huge \color{purple}{算法基础课题解}$
完整代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
double x;
cin>>x;
double l=-22,r=22;
while(r-l>1e-7)
{
double mid=(l+r)/2;
if(mid*mid*mid<=x) l=mid;
else r=mid;
}
printf("%lf\n",l);
return 0;
}