103400: [Atcoder]ABC340 A - Arithmetic Progression

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:7 Solved:0

Description

Score: $100$ points

Problem Statement

Print an arithmetic sequence with first term $A$, last term $B$, and common difference $D$.

You are only given inputs for which such an arithmetic sequence exists.

Constraints

  • $1 \leq A \leq B \leq 100$
  • $1 \leq D \leq 100$
  • There is an arithmetic sequence with first term $A$, last term $B$, and common difference $D$.
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

$A$ $B$ $D$

Output

Print the terms of the arithmetic sequence with first term $A$, last term $B$, and common difference $D$, in order, separated by spaces.


Sample Input 1

3 9 2

Sample Output 1

3 5 7 9

The arithmetic sequence with first term $3$, last term $9$, and common difference $2$ is $(3,5,7,9)$.


Sample Input 2

10 10 1

Sample Output 2

10

The arithmetic sequence with first term $10$, last term $10$, and common difference $1$ is $(10)$.

Input

Output

得分:100分

问题描述

打印一个首项为$A$,末项为$B$,公差为$D$的算术数列。

你只给出了存在这样的算术数列的输入。

限制条件

  • $1 \leq A \leq B \leq 100$
  • $1 \leq D \leq 100$
  • 存在一个首项为$A$,末项为$B$,公差为$D$的算术数列。
  • 所有的输入值都是整数。

输入

输入从标准输入按以下格式给出:

$A$ $B$ $D$

输出

按顺序打印出首项为$A$,末项为$B$,公差为$D$的算术数列的项,项之间用空格分隔。


样例输入1

3 9 2

样例输出1

3 5 7 9

首项为$3$,末项为$9$,公差为$2$的算术数列是$(3,5,7,9)$。


样例输入2

10 10 1

样例输出2

10

首项为$10$,末项为$10$,公差为$1$的算术数列是$(10)$。

加入题单

上一题 下一题 算法标签: