lwjjiayou 2015-11-29 07:14 采纳率: 0%
浏览 1469

C语言 这代替怎么写 急求

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

  • 写回答

1条回答 默认 最新

  • ysuwood 2015-11-29 08:09
    关注

    问题真不少。。。。。

    评论

报告相同问题?

悬赏问题

  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算