#P3338. [ZJOI2014] 力
[ZJOI2014] 力
Description
Given numbers , define
$$F_j~=~\sum_{i = 1}^{j - 1} \frac{q_i \times q_j}{(i - j)^2}~-~\sum_{i = j + 1}^{n} \frac{q_i \times q_j}{(i - j)^2}$$For , find the value of .
Input Format
The first line contains an integer .
Each of the following lines contains a real number. The number on the -th line represents .
Output Format
Output lines, each containing a real number. The number on the -th line represents .
Your output is considered correct if it differs from the standard answer by at most .
5
4006373.885184
15375036.435759
1717456.469144
8514941.004912
1410681.345880
-16838672.693
3439.793
7509018.566
4595686.886
10903040.872
Hint
Constraints
For of the testdata, .
For of the testdata, .
For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号