#t209. 计算多项式的值
计算多项式的值
Evaluate a Polynomial
Problem Background
Special for beginners, ^_^
Problem Description
For the polynomial and given , compute the value of .
Input Format
A single line containing real numbers: , and the values of the parameters . Each number is a double-precision floating-point number with absolute value not exceeding . The numbers are separated by a single space.
Output Format
A single real number, the value of , kept to 7 decimal places.
Sample Input
2.31 1.2 2 2 3
Sample Output
33.0838692
Constraints
Time limit: 1s, memory limit: 1024KiB for each test case.
Hint
- The five numbers on one line are all real numbers, and the first one is — do not reverse the reading order.
- Plug into the formula in the statement and keep 7 decimal places.
- Verify with the sample:
2.31 1.2 2 2 3→33.0838692.