题目描述
blablabla
样例
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
double n; cin >> n;
double pre_x = 2;
double e = 1e-7;
double x = 1;
while(x-pre_x>e||pre_x-x>e){
pre_x = x;
x = x - (x*x*x-n)/(2*x*x);
}
cout<<fixed<<setprecision(6)<<x;
return 0;
}