Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
136866 梁乃元 解一元三次方程 C++ 运行超时 0 2027 MS 252 KB 426 2024-03-09 15:51:48

Tests(0/6):


# include <bits/stdc++.h> using namespace std ; int a , b , c , d , cnt ; long double ans ( int x ) { return a * x * x * x + b * x * x + c * x + d ; } int main ( ) { cin >> a >> b >> c >> d ; for ( int i = -100 ; i <= 100 ; i += 0.01 ) { if ( cnt == 3 ) { break ; } if ( ans ( i ) == 0 ) { cout << fixed << setprecision ( 2 ) << i << ' ' ; cnt ++ ; i ++ ; } } return 0 ; }


测评信息: