I - Adding Up

Languages: C, C++, Java, Python, Kotlin
Time & Memory limits: (details)

Input

Output

Sample test(s)

Input
6 1 1 3 2 2 3 3 3 5 5 5 1
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
1 4 6 10 126 1
--- Showing first 30 lines (click "Copy" to get full content) ---