| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82570 | sh25_shenpy | 二分法求函数的零点 | C++ | 无测评数据 | 0 MS | 0 KB | 357 | 2026-01-15 19:01:22 |
#include<bits/stdc++.h> using namespace std; double f(double xx){ return pow(xx,5)-15*pow(xx,4)+85*pow(xx,3)-225*pow(xx,2)+274*xx-121; } int main() { const double x=0.000001; for(double y=1.5;y<=2.4;y+=x){ if(f(y)*f(y+x)<=0){ cout<<fixed<<setprecision(6)<<y; break; } } return 0; }