Analysis of Pat computer problems in Zhejiang University 1010. Mona polynomial derivation (25)

Source: Internet
Author: User
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 ;}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.