Description
Sauterne is a student in USTB. Now he has some difficulties learning Advanced Mathematics.
He doesn't know how to find the derivative of a polynomial. So he asks you for help.
He will give you f(x) and please output f '(x).
Input
The input consists of several test cases. The first line of the input is the number of cases as a positive integer.
Each test case contains a polynomial(f(x)) whose form is a1x^b1±a2x^b2±...±anx^bn.
(1<=n<=300,0<ai<1000,|bi|<1000,ai≠0,i∈(1,n]).
Output
For each test case, first print "Case X:", where X is the test case number (starting with 1) and then output the
derivative function of the polynomial which form is c1x^d1±c2x^d2±...±cmx^dm(cj≠0,j∈(1,m])
To make the answer more beautiful you should make sure that d1>d2>...>dm.
If all cj=0,j∈(1,m] output 0.
Sample Input
2
5x^3+7x^1-15x^0
3x^6+5x^3
Sample Output
Case 1:15x^2+7x^0
Case 2:18x^5+15x^2
问题真不少。。。。。