2079: 练14.4 计算多项式的值

Memory Limit:64 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

对于多项式$f(x)=ax^3+bx^2+cx+d$和给定的$a$,$b$,$c$,$d$,$x$,计算$f(x)$的值,保留到小数点后$7$位。

Input

输入仅一行,包含$5$个实数,分别是$x$,及参数$a$、$b$、$c$、$d$的值,每个数都是绝对值不超过$100$的双精度浮点数。数与数之间以一个空格分开。

Output

输出一个实数,即$f(x)$的值,保留到小数点后$7$位。

Sample Input Copy

2.31 1.2 2 2 3

Sample Output Copy

33.0838692

Source/Category