方程AI (CI翻译)
You are given an equation:
给定方程:AI (CI翻译)
$*Ax*^{2} + *Bx* + *C* = 0$.
$*Ax*^{2} + *Bx* + *C* = 0$。AI (CI翻译)
Your task is to find the number of distinct roots of the equation and print all of them in ascending order.
你的任务是求出该方程不同根的数量,并按升序输出所有根。AI (CI翻译)
Input
输入格式
AI (CI翻译)The first line contains three integer numbers $*A*, *B*$ and $*C*$ ($- 10^{5} ≤ *A*, *B*, *C* ≤ 10^{5}$). Any coefficient may be equal to 0.
第一行包含三个整数 $*A*, *B*$ 和 $*C*$($- 10^{5} ≤ *A*, *B*, *C* ≤ 10^{5}$)。任意一个系数都可能等于 0。AI (CI翻译)
Output
输出格式
AI (CI翻译)In case of infinite root count print the only integer -1. In case of no roots print the only integer 0. In other cases print the number of root on the first line and the roots on the following lines in the ascending order. Print roots with at least 5 digits after the decimal point.
如果根的数量为无穷多个,输出唯一的整数 -1。如果方程无根,输出唯一的整数 0。在其他情况下,第一行输出根的数量,接下来若干行按升序输出所有根。每个根的小数点后至少输出 5 位数字。AI (CI翻译)
样例
1 -5 6
2
2.0000000000
3.0000000000
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。