#include<bits/stdc++.h>
using namespace std;
#define f(x) (x*(x*(x*(x*8+7)+2)+3)+6)
double bsearch(double l,double r,double x)
{
double mid;
while(r-l>1e-7)
{
mid=(l+r)/2;
if(f(mid)<x)
{
l=mid;
}
else
{
r=mid;
}
}
return (l+r)/2;
}
int main(void)
{
int n;
double m;
scanf("%d",&n);
double f0,f100;
f0=f(0.0);
f100=f(100.0);
while(n--)
{
scanf("%lf",&m);
if(m<f0||m>f100)
{
printf("No solution!\n");
}
else
{
printf("%.4f\n",bsearch(0,100,m));
}
}
return 0;
}
相关文章
- 11-30【HDOJ6684】Rikka with Game(博弈)
- 11-30HDOJ.4578 Transformation (多种区间操作的线段树)
- 11-30HDOJ7060 Separated Number
- 11-30【HDOJ】2371 Decode the Strings
- 11-30hdoj1074--Doing Homework (DP 状态压缩)
- 11-30HDOJ1312 Red and black(DFS深度优先搜索)
- 11-30HDOJ 4276 The Ghost Blows Light(树形DP)
- 11-30hdoj1702//栈和队列(头文件)
- 11-30HDOJ 1093
- 11-30HDOJ1020 Encoding