Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
136826 林泽豪 解一元三次方程 C++ 通过 100 0 MS 248 KB 282 2024-03-09 15:30:10

Tests(6/6):


#include<bits/stdc++.h> using namespace std; double a,b,c,d; int check(double x){ if(abs(a*x*x*x+b*x*x+c*x+d)<0.01)return 0; return 1; } int main() { cin>>a>>b>>c>>d; for(double i=-100;i<100;i+=0.01){ if(check(i)==0){ printf("%0.2lf ",i); i+=0.99; } } }


测评信息: