Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
136826 林泽豪 解一元三次方程 C++ Accepted 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; } } }


Judgement Protocol: