-->
当前位置:首页 > 题库

PROGRAMMING:YJ solution equation

Luz5年前 (2021-05-10)题库377
YJ has a classmate who is not very good at mathematics, especially in the aspect of quadratic equation of one variable. In high school, there are many problems about the intersection of equation and X axis. YJ wants to type a code to help his classmate solve such problems.
###Input format:
The input is multi group. Each group first input n to represent the following n equations, and then input n equations (one quadratic term, one linear term and one constant term)( Because that student's mathematics is not good, so the number is a bit, and there must be a coefficient in front of X, to ensure that the quadratic coefficient and the primary coefficient can not be 0 at the same time).
###Output format:
For each equation, output the number of intersections with x-axis, if not, output "nonexistent!", Each output occupies one line.
###Input example:
Here is a set of inputs. For example:
```in
one
4X+2X^2+2
```
###Output example:
The corresponding output is given here. For example:
```out
one
```







answer:If there is no answer, please comment