(x=4*5,x*5),x+25
时间: 2024-06-14 12:03:49 浏览: 116
```C++
#include<bits/stdc++.h>
using namespace std;
double F(double x, double y) {
return 6*pow(x,7) + 8*pow(x,6) + 7*pow(x,3) + 5*pow(x,2) - y*x;
}
double f(double x) {
return 42*pow(x,6) + 48*pow(x,5) + 21*pow(x,2) + 10*x;
}
int main() {
int t;
double y, l, h, mid;
cin >> t;
while(t--) {
cin >> y;
l = 0.0;
h = 100.0;
while(h - l > 1e-7) {
mid = (l + h) / 2;
if(f(mid) < y)
l = mid;
else
h = mid;
}
printf("%0.4lf\n", F(mid, y));
}
return 0;
}
```
阅读全文