#129. 微积分?低程竟然有微积分?

    ID: 129 Type: Default 1000ms 256MiB Tried: 55 Accepted: 7 Difficulty: 8 Uploaded By: Tags>福建师范大学第26届低年级程序设计竞赛

微积分?低程竟然有微积分?

Time limit: 1 seconds

Memory limit: 256 megabytes

When you consider things like the stars, our affairs don't seem to matter very much, do they?—Night and Day, Writer, Virginia Woolf

题目描述

XXX一直对微积分感到头疼,可是期末考就快到了,于是XXX准备开始女娲补天。

他实在搞不懂复杂的微积分计算,于是来请教数理基础优秀的你。

由于XXX的数理基础过于薄弱,今天你只需要辅导他多项式相关的不定积分,请你告诉他某些多项式函数的原函数。其中多项式指原函数的形式为:

$$y=a_{n}x^n+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+...+a_{2}x^2+a_{1}x+a_0 $$

如果你碰巧也忘记了如何对多项式函数进行积分,那么善良的出题人也提供了公式如下:

xadx=xa+1a+1+C(a1)\int x^{a} d x=\frac{x^{a+1}}{a+1}+C(a \neq-1)

注意当系数出现分数时,分子与分母需要化为最简形式,系数绝对值为1或指数为1时需将其省略。具体输入输出见样例所示。

输入

一个字符串S,格式符合一般多项式的形式,其中保证指数范围为[0,100],系数范围为[-100,100],保证系数不为0。

输出

一个字符串A。

y'=6x^2+3x+1
y=2x^3+3/2x^2+x+C

Postscript

For someone special: There is nothing I would not do for those who are really my friends. I have no notion of loving people by halves, it is not my nature. You're right from your side. I'm right from mine.