Rotate Function Simulation

Format: space-separated integers (example: 4 3 2 6)
i × a[i]
Array