#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
//const double p = acos(-1);
double y;
bool text(double x)
{
if(8*x*x*x*x+7*x*x*x+2*x*x+3*x+6-y<1e-8)
return true;
return false;
}
int main()
{
int t;
scanf("%d", &t);
while(t--)
{
//double y;
scanf("%lf", &y);
if(y < 6||y>807020306)
{
printf("No solution!\n");
continue;
}
double l, r;
l = 0.0;
r = 100.0;
while(r-l>1e-8)
{
double mid = (l+r)/2;
if(text(mid)) l = mid;
else r = mid;
}
printf("%.4lf\n", l);
}
}
hdu2199
最新推荐文章于 2021-01-14 20:42:38 发布