#C14130. Multiply Elements by Their Indices
Multiply Elements by Their Indices
Multiply Elements by Their Indices
You are given a list of integers. Your task is to create a new list where each element is the product of the corresponding element in the input list and its index.
For an input list \(a_0, a_1, \dots, a_{n-1}\), the output should be:
[ 0 \times a_0,\ 1 \times a_1,\ \dots,\ (n-1) \times a_{n-1} ]
Your program should read input from standard input (stdin) and print the result to standard output (stdout) as space-separated integers.
inputFormat
The input is read from stdin. The first line contains an integer \(n\), which is the number of elements in the list. The second line contains \(n\) space-separated integers.
outputFormat
Print a single line containing \(n\) space-separated integers where the \(i^{th}\) integer is the product of \(i\) (0-indexed) and the \(i^{th}\) element of the input list.
## sample4
1 2 3 4
0 2 6 12