~/algor $ cat problems/massiv-arifmetik-progressiya
Terms of an arithmetic progression
Easy
1000 ms
128 MB
25%
A positive integer $n$ ($n \ge 2$), the first term $A$ and the common difference $D$ are given. Build and print the array of the first $n$ terms of the arithmetic progression:
$$A, \quad A + D, \quad A + 2 * D, \quad \dots$$
Input
One line with three integers: $n$, $A$ and $D$.
Output
One line with $n$ integers separated by spaces.
Note
$2 \le n \le 1000$
$-1000 \le A, D \le 1000$
Examples
Input #1
5 3 4
Output #1
3 7 11 15 19
Input #2
4 10 -2
Output #2
10 8 6 4