| 记录编号 | 184819 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 92.[NOIP 2001]一元三次方程求解 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.012 s | ||
| 提交时间 | 2015-09-03 21:54:31 | 内存使用 | 0.17 MiB | ||
#include<stdio.h>
#include<math.h>
double i,a,b,c,d;
double p=1e-6;
double health(double x)
{return a*x*x*x+b*x*x+c*x+d;
}
int main()
{
freopen("3cfc.in","r",stdin);
freopen("3cfc.out","w",stdout);
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
for(i=-100;i<=100;i+=0.01)
{
if(health(i)<p&&health(i)>-p)
printf("%.2lf ",i);
}
}