1010. mona1 polynomial derivation (25) Time Limit 400 MS
The memory limit is 32000 kb.
Code length limit: 8000 B
Criterion
The design function is used to evaluate the derivative of a polynomial.
Input Format:Input the non-zero coefficient and exponent of the polynomial in the exponential descent mode (the absolute values are integers up to 1000 ). Numbers are separated by spaces.
Output Format:Outputs the coefficients and exponent of the non-zero polynomial of the derivative in the same format as the input. Numbers are separated by spaces, but no extra space is allowed at the end.
Input example:
3 4-5 2 6 1-2 0
Output example:
12 3-10 1 6 0
# Include <iostream>
# Include <string> using namespace STD; int main () {int K, J; bool flag = false; while (CIN> K> J) {If (K * j) {If (FLAG) cout <"; else flag = true; cout <K * j <" <J-1 ;}} if (! Flag) cout <"0 0"; return 0 ;}