~/algor $ cat problems/massiv-geometrik-progressiya
Terms of a geometric progression
Easy
1000 ms
128 MB
26%
A positive integer $n$ ($n \ge 2$), the first term $A$ and the common ratio $R$ are given. Build and print the array of the first $n$ terms of the geometric progression:
$$A, \quad A * R, \quad A * R^{2}, \quad \dots$$
Input
One line with three integers: $n$, $A$ and $R$.
Output
One line with $n$ integers separated by spaces.
Note
$2 \le n \le 20$
$1 \le A \le 20$
$2 \le R \le 5$
Examples
Input #1
4 3 2
Output #1
3 6 12 24
Input #2
3 5 3
Output #2
5 15 45