#P3338. Calculate Modified Weighted Quotients

    ID: 16595 Type: Default 1000ms 256MiB

Calculate Modified Weighted Quotients

Calculate Modified Weighted Quotients

Given (n) numbers (q_1, q_2, \dots, q_n), 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}, ]

and

[ E_i = \frac{F_i}{q_i}. ]

For (1 \leq i \leq n), compute (E_i).

inputFormat

The first line contains an integer (n), representing the number of elements. The second line contains (n) space-separated numbers (q_1, q_2, \dots, q_n). It is guaranteed that none of the (q_i) are zero.

outputFormat

Output (E_i) for (1 \leq i \leq n) in order, separated by spaces. The answers should be printed with sufficient precision.

sample

3
1 2 3
-2.7500000000 -2.0000000000 2.2500000000