using namespace std;
#define f(x) (x*(x*(x*(x*8+7)+2)+3)+6)
double fact(double l,double r,double y)
{
double mid;
while(r-l>1e-7)
{
mid=(l+r)/2.0;
if(f(mid)>y)
{
r=mid;
}
else
l=mid;
}
return (l+r)/2;
}
int main(void)
{
int n;
double x;
double f0,f100;
scanf("%d",&n);
while(n--)
{
scanf("%lf",&x);
f0=f(0);
f100=f(100);
if(x<f0||x>f100)
{
printf("No solution!\n");
continue;
}
else
{
printf("%.4f\n",fact(0,100,x));
}
}
return 0;
}
在这里插入代码片