#include<bits/stdc++.h>
using namespace std;
double q(double a)
{
return a*a*a;
}
int main()
{
double n; cin >> n;
double l = -10000, r = 10000;
while(r - l > 1e-7)
{
double mid = (l+r)/2;
if(mid*mid*mid <= n) l = mid;
else r = mid;
}
printf("%.6f",r);
}
这是什么?
二分法求 三次方根啊
我傻了QAQ