#abc340a. A - Arithmetic Progression

A - Arithmetic Progression

Score: 100100 points

问题描述

打印一个首项为 AA、末项为 BB、公差为 DD 的等差数列。

请注意,仅当存在满足条件的等差数列时才会提供输入。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Print an arithmetic sequence with first term AA, last term BB, and common difference DD.

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

Constraints

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

Input

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

AA BB DD

Output

Print the terms of the arithmetic sequence with first term AA, last term BB, and common difference DD, in order, separated by spaces.

Sample Input 1

3 9 2

Sample Output 1

3 5 7 9

The arithmetic sequence with first term 33, last term 99, and common difference 22 is (3,5,7,9)(3,5,7,9).

Sample Input 2

10 10 1

Sample Output 2

10

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

update @ 2024/3/10 01:32:22