Problem:
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

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using static System.Console;
using static System.Math;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TemplateAlgorithm
{

    /// <summary>
    /// 素集合(UnionFindTree)
    /// </summary>
    class DisjointSet
    {
        public List<int> Rank { get; set; }
        public List<int> Parent { get; set; }

        public DisjointSet()
        {
            Rank = new List<int>();
            Parent = new List<int>();
        }

        public DisjointSet(int size)
        {
            Rank = Enumerable.Repeat(0, size).ToList();
            Parent = Enumerable.Repeat(0, size).ToList();

            for (var i = 0; i < size; i++) { MakeSet(i); }
        }

        public void MakeSet(int x)
        {
            this.Parent[x] = x;
            this.Rank[x] = 0;
        }

        public int FindSet(int x)
        {
            if (!IsRoot(x))
            {
                Parent[x] = FindSet(Parent[x]);
            }
            return Parent[x];
        }

        public void Unite(int x, int y)
        {
            x = FindSet(x);
            y = FindSet(y);

            if (Rank[x] > Rank[y])
            {
                Parent[y] = x;
            }
            else
            {
                Parent[x] = y;
                if (Rank[x] == Rank[y])
                {
                    Rank[y]++;
                }
            }
        }

        public bool IsSame(int x, int y) => FindSet(x) == FindSet(y);

        public bool IsRoot(int x) => x == Parent[x];
    }

    class Program
    {
        public const long Inf = (long)1e18;
        public const double eps = 1e-6;
        public const string alfa = "abcdefghijklmnopqrstuvwxyz";
        public const string ALFA  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        public const int MOD = 1000000007;

        static void Main(string[] args)
        {            
            int[] data = IO.ReadIntArr();

            int K, X;
            K = data[0];
            X = data[1];
            
            for (var i = X - K + 1; i < X + K; i++)
            {
                Write(i);
                if (i != X + K - 1) Write(" ");
            }
            WriteLine();            
        }

        #region MIN,MAX

        /// <summary>
        /// 最大値を返す
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="vals"></param>
        /// <returns></returns>
        public static T MaxValue<T>(params T[] vals) => vals.Max();

        /// <summary>
        /// 最小値を返す
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="vals"></param>
        /// <returns></returns>
        public static T MinValue<T>(params T[] vals) => vals.Min();
        #endregion

        #region IO

        /// <summary>
        /// IO
        /// </summary>
        public class IO
        {
            public static string ReadStr(bool isTrim = false) => (isTrim) ? Console.ReadLine().Trim() : Console.ReadLine();
            public static int ReadInt() => int.Parse(ReadStr());
            public static uint ReadUInt() => uint.Parse(ReadStr());

            public static long ReadLong() => long.Parse(ReadStr());
            public static ulong ReadULong() => ulong.Parse(ReadStr());

            public static decimal ReadDecimal() => decimal.Parse(ReadStr());
            public static double ReadDouble() => double.Parse(ReadStr());
            public static string[] ReadStrArr(char separator = ' ') => Console.ReadLine().Split(separator);
            public static int[] ReadIntArr() => Array.ConvertAll(ReadStrArr(), int.Parse);
            public static long[] ReadLongArr() => Array.ConvertAll(ReadStrArr(), long.Parse);

            public static ulong[] ReadULongArr() => Array.ConvertAll(ReadStrArr(), ulong.Parse);

            public static decimal[] ReadDecimalArr() => Array.ConvertAll(ReadStrArr(), decimal.Parse);
            public static double[] ReadDoubleArr() => Array.ConvertAll(ReadStrArr(), double.Parse);
            
            public static void Cout<T>(T value) => Console.WriteLine(value);
            public static void CoutJoin<T>(T[] values, string separator = " ") => Cout(string.Join(separator, values));
        }

        #endregion();
    }
}