B - One Clue Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 200

問題文

数直線上に 2000001 個の石が置かれています。これらの石の座標は -1000000, -999999, -999998, \ldots, 999999, 1000000 です。

これらの石のうち、ある連続する K 個の石が黒で塗られており、それ以外の石は白で塗られています。

また、座標 X にある石は黒で塗られていることが分かっています。

黒で塗られている石が置かれている可能性のある座標をすべて、小さい順に出力してください。

制約

  • 1 \leq K \leq 100
  • 0 \leq X \leq 100
  • 入力中の値はすべて整数である。

入力

入力は以下の形式で標準入力から与えられる。

K X

出力

黒で塗られている石が置かれている可能性のある座標をすべて、空白で区切って小さい順に出力せよ。


入力例 1

3 7

出力例 1

5 6 7 8 9

黒で塗られた石の数が 3 個であることと、座標 7 の石が黒で塗られていることが分かっています。このとき、次の 3 通りの可能性が考えられます。

  • 黒で塗られた 3 個の石は座標 5,6,7 に置かれている。
  • 黒で塗られた 3 個の石は座標 6,7,8 に置かれている。
  • 黒で塗られた 3 個の石は座標 7,8,9 に置かれている。

よって、黒で塗られている石が置かれている可能性のある座標は 5,6,7,8,95 つです。


入力例 2

4 0

出力例 2

-3 -2 -1 0 1 2 3

負の座標に黒で塗られている石が置かれている可能性もあります。


入力例 3

1 100

出力例 3

100

Score : 200 points

Problem Statement

There are 2000001 stones placed on a number line. The coordinates of these stones are -1000000, -999999, -999998, \ldots, 999999, 1000000.

Among them, some K consecutive stones are painted black, and the others are painted white.

Additionally, we know that the stone at coordinate X is painted black.

Print all coordinates that potentially contain a stone painted black, in ascending order.

Constraints

  • 1 \leq K \leq 100
  • 0 \leq X \leq 100
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

K X

Output

Print all coordinates that potentially contain a stone painted black, in ascending order, with spaces in between.


Sample Input 1

3 7

Sample Output 1

5 6 7 8 9

We know that there are three stones painted black, and the stone at coordinate 7 is painted black. There are three possible cases:

  • The three stones painted black are placed at coordinates 5, 6, and 7.
  • The three stones painted black are placed at coordinates 6, 7, and 8.
  • The three stones painted black are placed at coordinates 7, 8, and 9.

Thus, five coordinates potentially contain a stone painted black: 5, 6, 7, 8, and 9.


Sample Input 2

4 0

Sample Output 2

-3 -2 -1 0 1 2 3

Negative coordinates can also contain a stone painted black.


Sample Input 3

1 100

Sample Output 3

100