#P1487. 失落的成绩单
失落的成绩单
Description
On this day, the teacher wants to check the -th student's grade. To avoid getting scolded, MC tries hard to recall and remembers a pattern on the report card:
If the grades are viewed as a real-valued sequence, then (that is, each term equals the difference between its previous and next terms divided by , then plus ). At this point, I told MC the first term and the last term of an -term sequence, as well as . The rest is up to you!
Input Format
The first line contains two integers .
The second line contains three real numbers, in order: .
Output Format
Output a real number , rounded to decimal places.
53 23
0.543 1.213 9768.134
0.543
Hint
Constraints: , , .
Translated by ChatGPT 5
京公网安备 11011102002149号