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

PROGRAMMING:Addition of polynomials

Luz5年前 (2021-05-10)题库503
Express polynomials with linked list and realize the addition operation of polynomials
###Input format:
The input gives the coefficients and exponents of the first polynomial Polya in the first line, and ends the input of the first polynomial with 0,0; In the second line, the coefficients and exponents of the first polynomial polyb are given, and the input of the first polynomial is ended with 0,0.
###Output format:
For each set of inputs, output the coefficients and exponents of Polya + polyb and polynomial in one line.
###Input example:
```in
5,0 2,1 1,6 8,15 0,0
-2,1 3,6 4,8 0,0
```
###Output example:
```out
5,0 4,6 4,8 8,15
```







answer:If there is no answer, please comment