Recently, Tesley has been learning about polynomials, and since her friends always throw around the term "🥕suba", she would like to learn more about it.
Tesley wants to know how many terms the resulting polynomial will have if she multiplies two polynomials that have
For example
Can you help Tesley determine the number of terms in the resulting polynomial after they are multiplied together?
Constraints
For this problem, you will be required to pass all the samples in order to receive points.
Input Specification
The first line will contain
The second line will contain two space-separated integers
Output Specification
This problem is graded with an identical
checker. This includes whitespace characters. Ensure that every line of output is terminated with a \n
character and that there are no trailing spaces.
Output
Sample Input 1
2
2 2
3 4
Sample Output 1
3
6
Sample Explanation 1
For the first test case,
There are two polynomials with two terms,
For the second test case,
There are two polynomials with degree
Comments