#include<iostream>
using namespace std;
int main(){
double n;
cin>>n;
int l=1,r=n;
while(l+1e-7<r){
double mid=(l+r)/2;
if(mid*mid*mid>=n){
r=mid;
}else
l=mid;
}
printf("%0.6lf",l);
}
标签:方根,int,double,mid,二分法,三次 From: https://www.cnblogs.com/chenxinyue/p/17227676.html