https://codeforces.com/problemset/problem/1542/C
Input Format
Check link
Output Format
Check link
Constraints
Check link
Example
Input
6 1 2 3 4 10 10000000000000000
Output
2 5 7 10 26 366580019
https://codeforces.com/problemset/problem/1542/C
Check link
Check link
Check link
6 1 2 3 4 10 10000000000000000
2 5 7 10 26 366580019