#T336. 一元三次方程求解
一元三次方程求解
Description
A cubic equation in one variable takes the form: .
Given the coefficients of each term in the equation (, , , are all real numbers), it is guaranteed that the equation has three distinct real roots (with roots ranging between and ), and the absolute difference between any two roots is at least . The task is to output these three real roots in ascending order on the same line (separated by spaces), rounded to two decimal places.
Input Format
One line containing four real numbers , , , , separated by single spaces.
Output Format
One line containing three real numbers, representing the three real roots of the equation, listed in ascending order, separated by single spaces, and rounded to two decimal places.
1.0 -5.0 -4.0 20.0
-2.00 2.00 5.00