E - Exact Steps

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

Input

Output

Sample test(s)

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