Problem list
Log in
#r02750 · Online Judge > GoldOJ

Print With a Step

Bronze IV 2.0 s 1024 MB

Given $a$, $b$, $c$, print $a, a+c, a+2c, \dots$ while the value is $\le b$, one per line.

Input

Three integers $a$, $b$, $c$ ($1 \le a \le b \le 1000$, $1 \le c \le 10$).

Output

Print the values from $a$ stepping by $c$ while $\le b$, one per line.

Example 1

Input
2 10 3
Output
2
5
8
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