解方程:
#include <iostream>
#include <stdio.h>
#define eps 1e-8
using namespace std;
double aim;
double bs()
{
double l = 0,r = 100,m;
while(l < r)
{
//cout<<m<<endl;
m = (l+r) / 2;
if(8*m*m*m*m+7*m*m*m+2*m*m+3*m+6 == aim) return m;
else if(8*m*m*m*m+7*m*m*m+2*m*m+3*m+6 > aim) r = m-eps;
else l = m + eps;
}
return l;
}
int main()
{
double ans;
int t;
cin>>t;
while(t --)
{
cin>>aim;
if(aim >= 6&&aim<=800000000+7000000+20000+300+6)
printf("%.4llf\n",bs());
else cout<<"No solution!"<<endl;
}
return 0;
}