#P6414. [COCI 2014/2015 #1] PROSJEK
[COCI 2014/2015 #1] PROSJEK
Description
There is a sequence . Now define a sequence by the following formula:
You are given the sequence . Please find the sequence .
Input Format
The first line contains an integer , which is the length of the sequence .
The next line contains integers, representing the sequence .
Output Format
Output one line with integers, representing the sequence .
1
2
2
4
3 2 3 5
3 1 5 11
5
1 2 2 3 4
1 3 2 6 8
Hint
Sample Input/Output 3 Explanation
When the sequence , the sequence $b=\frac{1}{1},\frac{1+3}{2},\frac{1+3+2}{3},\frac{1+3+2+6}{4},\frac{1+3+2+6+8}{5}$, that is, .
Constraints
For of the testdata, it is guaranteed that and .
Notes
The total score of this problem is points.
This problem is translated from T1 PROSJEK of Contest #1 in Croatian Open Competition in Informatics 2014/2015.
Translated by ChatGPT 5
京公网安备 11011102002149号