Problem list
Log in
#r02761 · Online Judge > GoldOJ

Geometric Sequence

Bronze IV 2.0 s 1024 MB

Given first term $a$, count $n$, and common ratio $r$, print the $n$ terms of the geometric sequence, one per line.

Input

Three integers $a$, $n$, $r$ ($1 \le a \le 10$, $1 \le n \le 10$, $1 \le r \le 10$).

Output

Print the $n$ terms, one per line.

Example 1

Input
2 5 3
Output
2
6
18
54
162
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code