| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 136866 | 梁乃元 | 解一元三次方程 | C++ | Time Limit Exceeded | 0 | 2027 MS | 252 KB | 426 | 2024-03-09 15:51:48 |
# 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 ; }