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



Sample input:
3 7


Sample output:
5 6 7 8 9

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
for i in range(X - K + 1, X + K):
  if i < X + K - 1:
    print(i, end=' ')
  else:
    print(i)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
for i in range(x-k+1,x+k):
    print(i)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

K, X = map(int, input().split())

print(*[i for i in range(X - K + 1, X + K)])

Submission status: Accepted

Solution code:
import sys

from operator import itemgetter

def main():
	lo=-1000000
	hi=1000000
	input = sys.stdin.readline
	k,x = [int(item) for item in input().split()]
	lst=[i for i in range(max(lo,x-k+1),min(hi,x+k-1)+1)]
	print(" ".join([str(n) for n in lst]))

main()

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""
#decomment when needed
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
n,k = ips()
left = max(-100000 , k-n+1)
right = min(100000 , k+n)
a = [i for i in range(left,right)]
for i in range(len(a)-1):
    print(a[i],end = " ")
print(a[len(a)-1])

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    K, X = [int(x) for x in stdin.readline().rstrip().split()]
    spam = [i + (X - K + 1) for i in range(2 * K - 1)]
    print(*spam, end=' ')
    print('')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
inputs = [int(x) for x in input().split()]
k, x = inputs[0], inputs[1]

absmax = 1000000

high = x + k - 1 if x + k - 1 <= absmax else absmax
low = x - k + 1 if x - k + 1 >= -absmax else -absmax

from functools import reduce
print(reduce(lambda prev, curr: "{} {}".format(prev, str(curr)) , range(low, high+1), "")[1:])

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
ans = range(X - K + 1, X + K)
print(*ans)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
ans = [i for i in range(X - K + 1, X + K)]
print(*ans)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())

iMin = X - K + 1
iMax = X + K - 1
anss = list(range(max(-10**6, iMin), min(10**6, iMax)+1))

print(*anss)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
ans = list(range(K-N+1, K+N))
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())

#X +- (K-1)　を一列に出力する

ans = ""

for i in range(X-(K-1), X+(K-1)+1):
  ans = ans + str(i) + " "
ans.lstrip(" ")
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
k,x= map(int,input().split())
a = np.arange(x-(k-1),x+k)
for i in range(len(a)):
  print("{}".format(a[i]),end = ' ')

Submission status: Accepted

Solution code:
def main():
    k, x = map(int, input().split())
    ans = []
    for i in range(max(x - k + 1, -1000000), min(x + k, 1000000)):
        ans.append(i)
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
# /usr/bin/python3

def main():
  k, x = map(int, input().strip().split(' '))
  print(' '.join([str(i) for i in range(x-k+1, x+k)]))
  pass

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
a=X-K+1
b=X+K
ans=''
for i in range(a,b):
    ans+=str(i)+' '
print(ans)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())

lst = []
for i in range(0,k):
  lst.append(x+i)
  lst.append(x-i)

lst = list(set(lst))

lst = ([i for i in lst if i  <= 1000000 and i >= -1000000])
print(' '.join(map(str,sorted(lst))))

Submission status: Accepted

Solution code:
k,x = map(int, input().split())

ans_list = list(map(lambda test: test, range(x-k+1, x+k)))

print(' '.join(map(str, ans_list)))

Submission status: Accepted

Solution code:
k, x = list(map(int, input().split()))

ans = []
for i in range(x-k+1, x+k):
    ans.append(i)

print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x = b + a - 1
y = b - a + 1
for i in range(x - y + 1):
  print(y + i,end=" ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())

min_ = X - K + 1 if X - K + 1 > -1000001 else -1000000
max_ = X + K - 1 if X + K - 1 < 1000001 else 1000000

for i in range(min_, max_ + 1):
    print(i, end=" ")

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
a = [i for i in range(x-k+1,x+k)]
print(*a)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
lst = [x]
for i in range(1,k):
    lst.extend([x+i,x-i])
lst.sort()
lst_s = [str(i) for i in lst]

print(" ".join(lst_s))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

k, x = map(int, input().split())
print(' '.join(map(str, range(x - k + 1, x + k))))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

k, x = map(int, input().split())

min_x = max(x - k + 1, -1000000)

max_x = min(x + k - 1, 1000000)

ans = []
for i in range(x - k + 1, x + k):
    ans.append(str(i))

print(' '.join(ans))

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
r=[]
for i in range(x-(k-1),x+k,1):
  if i >= (-1000000) and i <= 1000000:
    r.append(str(i))

print(" ".join(r))

Submission status: Accepted

Solution code:
AB = input().split()
A = int(AB[0])
B = int(AB[1])

s = B - A + 1
e = B + A

list = [i for i in range(s,e)]

print(*list)

Submission status: Accepted

Solution code:
K, X =[int(x) for x in input().split()]
s = [str(i) for i in range(X-K+1,X+K)]
h = ' '.join(s)
print(h)

Submission status: Accepted

Solution code:
def main():
    input_line = list(map(int,input().split()))
    A = range(input_line[1]-input_line[0]+1,input_line[1]+input_line[0],1)
    for i in A:
        print(str(i),end=" ")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K, X = map(int, input().split(' '))
print(' '.join([str(i) for i in range(X - (K - 1), (X + K))]))

Submission status: Accepted

Solution code:
k, x = map(int, input("").split(" "))
ans_array = []
for i in range(k-1):
    ans_array.append(x-(i+1))
for i in range(k-1):
    ans_array.append(x+(i+1))
ans_array.append(x)
ans_array.sort()
for i in range(len(ans_array)):
    if i == 0:
        ans = str(ans_array[i])
    else:
        ans += " "
        ans += str(ans_array[i])
print(ans)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())

for i in range(x-k+1,x+k):
    print(i)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())

kmin = x-k+1
kmax = x+k
list1 = [i for i in range(kmin,kmax)]
stra = ""
for i in range(len(list1)):
    stra += str(list1[i]) + " "
print(stra)

Submission status: Accepted

Solution code:
n,k=[int(x) for x in input().split(' ')]
for x in range(k-n+1,k+n):
  print(x)

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
l = [str(i) for i in range(x-k+1, x+k)]
print(' '.join(l))

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
l = [str(i) for i in range(x-k+1, x+k)]
ll = ' '.join(l)
print(ll)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
K = a[0]
X = a[1]
m = X - K + 1
M = X + K - 1
size = M - m + 1
while m <= M:
  print(m)
  m += 1

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[11]:


k, x = map(int, input().split())
for i in range(x - k + 1, x + k):
    if i >= -1000000 and i <= 1000000:
        print(i, end=' ' )

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
for i in range (2*K -1):
    print(X - (K - 1)+i, end = " ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
n = []

for i in range (2*K -1):
    n.append(X - (K - 1)+i)
    

N=[str(a) for a in n]
N=" ".join(N)
print(N)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

lis = [i for i in range(b-a+1,a+b)]
    
for i in range(len(lis)):
    print(lis[i],end = " ")

Submission status: Accepted

Solution code:
K, X =map(int,input().split())
for i in range(X-K+1,X+K):
    print(i,end=" ")

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
q = list(range(x-k+1, x+k))
r = map(str, q)
print(' '.join(r))

Submission status: Accepted

Solution code:
k, x = map(int, input().split(" "))

l = list(range(x-k+1, x+k, 1))
l = list(filter(lambda x: x>=-1000000 and x<= 1000000, l))
l = [str(i) for i in l]
print(" ".join(l))

Submission status: Accepted

Solution code:

a,b = map(int,input().split())
l =[]
for i in range(a*2-1):
    l.append(b-a+1+i)
print(*l)

Submission status: Accepted

Solution code:
k, x = list(map(int, input().split()))

for i in range(max(x - k + 1, -1000000), min(x + k, 1000001)):
    print(i, end=" ")

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
l=max(x-k+1,-1000000)
r=min(x+k-1,1000000)
ans=list(range(l,r+1))
print(*ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(" ".join(list(map(str,range(b-a+1,b+a)))))

Submission status: Accepted

Solution code:
v = list(map(int, input().split()))

kagen = v[1] - v[0] + 1
jogen = v[1] + v[0]
ans = list()
for i in range(kagen, jogen):
  ans.append(str(i))
print(" ".join(ans))

Submission status: Accepted

Solution code:
import numpy as np

k,x = np.array(list(map(int,input().split())))
initial = int(x)

for index in range(k-1):
  x = np.append(x,initial+index+1)
  x = np.insert(x,0,initial-index-1)

if x.size > 1:
  print(" ".join(list(map(str,x))))
else:
  print(x)

Submission status: Accepted

Solution code:
k,x=map(int, input().split());print(x) if k == 1 else print(' '.join(list(map(str, (range(x-(k-1), x+k))))))

Submission status: Accepted

Solution code:
k, x = map(int, raw_input().split())
print ' '.join([str(q) for q in range(x-k+1, x+k)])

Submission status: Accepted

Solution code:
K,X= list(map(int,input().split())) 

i = X - (K - 1)
while i < K + X:
  if i == (K + X -1):
    print(i)
  else:
    print(i,end=" ")
  i += 1

Submission status: Accepted

Solution code:
K, X = map(int, input().split())

first_point = X - K + 1
last_point = X + K - 1

if first_point < -1000000:
    first_point = -1000000
if last_point > 1000000:
    last_point = 1000000

for _ in range(first_point, last_point+1):
    print(_)

Submission status: Accepted

Solution code:
K, X = [int(_) for _ in input().split()]

s = max(X - K + 1, -1000000)
e = min(X + K - 1, 1000000)

ans = [str(i) for i in range(s, e+1)]
print(" ".join(ans))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(2*a-1):
  print(b-a+1+i,end=" ")

Submission status: Accepted

Solution code:
#整数の入力
k, x = map(int, input().split())
#可能性のある整数のリスト作成
a = [str(n) for n in range (x - k + 1, x + k)]
#出力
print(" ".join(a))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
K, X = map(int, input().split())
ans = [0] * (K * 2 - 1)
ans[0] = X - (K - 1)

for i in range(1, len(ans)):
	ans[i] = ans[i - 1] + 1

print(*ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

min = b - a + 1
max = b + a

list = [str(i) for i in range(min,max)]
s = ' '.join(list)
print(s)

Submission status: Accepted

Solution code:
k,x = map(int ,input().split())
arr =[]

for i in range(x,x-k,-1):
  arr.append(i)
  
for i in range(x,x+k,1):
  arr.append(i)

arr=list(set(arr))
arr.sort()
for  i in arr:
	print(i,end = ' ')

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
for i in range(x-k+1, x+k):
    print(i, end=" ")

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
print(' '.join([str(x) for x in range(X-K+1,X+K)]))

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
for i in range(x-k+1,x+k):
	print (i)

Submission status: Accepted

Solution code:
tmp = input().split()
k = int(tmp[0])
x = int(tmp[1])
ans = ""

for i in range(2*k-1):
  ans = ans + str(x-k+1+i) + " "

print(ans)

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
for a in range(X-K+1, X+K, 1):
	print(a, end=' ')

Submission status: Accepted

Solution code:
x, k = map(int, input().split())
print(*range(k-x+1, x+k), sep=' ')

Submission status: Accepted

Solution code:
K, X = input().split()

x = int(X)-int(K)+1
while x <= int(X)+int(K)-1:
  print(x, end=' ')
  x += 1

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# input
K, X = map(int, input().split())

# solve & output
if K > 1:
    for i in range(X - K + 1, X + K):
        if i == X + K - 1:
            print(i)
        else:
            print(i, end=' ')
else:
    print(X)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]


K = int_list[0]
X = int_list[1]

min_point = X - K + 1
max_point = X + K 


for i in range(min_point,max_point):
    if i == max_point-1:
        print(i,end='')
    else:print(i,end=' ')

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
for i in range(X-K+1,X+K):
	print(i)

Submission status: Accepted

Solution code:
k,x= map(int,input().split())
l=[]
cnt = x-k+1
while cnt < x+k:
  l = l + [cnt]
  print(cnt ,end=" ")
  cnt = cnt +1

Submission status: Accepted

Solution code:
K, X = (int(x) for x in input().split())
ans = []

for i in range((K-1)*2 + 1):
    ans.append(X - (K-1) + i)
    
print(*ans)

Submission status: Accepted

Solution code:
import os,re,sys,operator
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy
import heapq

setrecursionlimit(10**6)

k,x=map(int,input().split())
if k==x:
    ans=list(range(1,k+x))
else:
    ans=list(range(x-k+1,x+k))
print(*ans)

Submission status: Accepted

Solution code:
K,X=map(int,input().split());[print(i,end=" ")for i in range(X-K+1,X+K)]

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
print(str(list(range(X - K + 1, X + K))).replace(",", " ")[1:-1])

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
l = []
for i in range(x - k + 1,x + k):
  print(i,end = ' ')

Submission status: Accepted

Solution code:
k, x = (int(i) for i in input().split())

max = 1000000
min = -1000000
ans_list = []

if x-k+1 < min:
    bottom = min
else:
    bottom = x-k+1

if x+k-1 > max:
    head = max
else:
    head = x+k-1


for number in range(bottom, head+1):
    ans_list.append(number)

print(*ans_list)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
s = ""
for i in range(X-(K-1), X+K):
    s+= str(i)+" "
print(s[0:len(s)-1])

Submission status: Accepted

Solution code:
n=input().split()
K=int(n[0])
X=int(n[1])

for i in range(0,2*K-1):
    b=range(X-(K-1),X+K,1)
    print(b[i])

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
for i in range(max(x-k+1, -1000000), min(x+k, 1000001)):
  print(i, end=' ')
print()

Submission status: Accepted

Solution code:
K, X = list(map(int, input().split()))

min = X-K+1
max = X+K-1

for i in range(min, max+1):
  print(i, end=" ")

Submission status: Accepted

Solution code:
import glob
import numpy as np


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\137\\B'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class B(Common):

    def resolve(self):

        tmp = [int(i) for i in self.input_data().split()]
        K = tmp[0]
        X = tmp[1]

        start = X - (K-1)
        if start < -1000000:
            start = -1000000
        end = X + (K-1)
        if end > 1000000:
            end = 1000000

        for i in range(start, end + 1):
            if i == end:
                print(str(i))
            else:
                print(str(i), end=' ')


solver = B(REL_PATH)
solver.exec_resolve()

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
for i in range(x-k+1,x+k):
    if i==x+k-1:
        print(i)
    else:
        print(i,end=' ')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

lst = list(range(b-(a-1), b+(a-1)+1))
           
for i in lst:
      if i >= -1000000 and i <= 1000000:
          print(i)

Submission status: Accepted

Solution code:
"""
 // Author : snape_here - Susanta Mukherjee

"""
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()

    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
from math import ceil,floor,log,sqrt,factorial,pow,pi
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading


# For getting input from input.txt file 
#sys.stdin = open('input.txt', 'r')  
  
# Printing the Output to output.txt file 
#sys.stdout = open('output.txt', 'w') 

def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())

def main():
    
    k,x=mi()
    a=x-k+1 
    b=x+k-1 
    l=[]
    for i in range(a,b+1):
        l.append(i)
    print(*l)
        
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        if self.buffer.tell():
            return self.buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", b" "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", b"\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b"\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
temp=list(map(int, input().split()))
K=temp[0]
X=temp[1]

sita=int(X-K+1)
ue=int(X+K-1)

sita=max([sita, -1000000])
ue=min([ue, 1000000])
ans=[i for i in range(sita, ue+1)]

for i in range(len(ans)):
  print(ans[i], end=' ')

Submission status: Accepted

Solution code:
kx = input().split(' ')
k = int(kx[0])
x = int(kx[1])

for i in range(x-k+1,x+k):
  print(i, end = ' ')

Submission status: Accepted

Solution code:
def Printer(K, X):
    start = X - K+1
    ans = ''
    for start in range(start, X + K):
        ans += str(start) + ' '

    print (ans)

def main():
    inp = input()
    inp = inp.split()
    K = int(inp[0])
    X = int(inp[1])
    Printer(K, X)



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
a = []
for i in range(x-k+1,x+k):
    print(i, end =" ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
out_list = []
for i in range(X-(K-1), X+(K)):
  out_list.append(str(i))
print(" ".join(out_list))

Submission status: Accepted

Solution code:
import sys

K,X = map(int,sys.stdin.readline().split())
left=max(-1000000, X-K+1)
right=min(1000000, X+K-1)

ansList = list(range(left,right+1))
print(' '.join(map(str,ansList)))

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
low = X-K+1
high = X+K-1
li = [i for i in range(low,high+1)]
print(*li)

Submission status: Accepted

Solution code:
K , X = map(int , input().split())

for i in range(X-K+1 , X+K):
  print(str(i),end=' ')

Submission status: Accepted

Solution code:
K, X = list(map(int, input().split()))
my_list = [i for i in range(X-K+1, X+K)]
print(*my_list)

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
b = [str(a) for a in range(X-K+1,X+K)]
print(" ".join(b))

Submission status: Accepted

Solution code:
K, X = list(map(int, (input().split(' '))))
 
stones = set(list(range(-1000000, 1000000+1)))
stones = set(list(range(X - K + 1, X + K)))
print(' '.join(map(str, (sorted(list(stones))))))

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
li=[]
for i in range(X-K+1,X+K):
  li.append(i)
print(*li)

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))

for j in range(i[1] + 1 - i[0], i[1] + i[0]):
    print(j, end=" ")

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
diff = k - 1
start = x - diff
end = x + diff
rangg = list(range(start, end+1))
print(' '.join(map(str, rangg)))

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split()) 
s = b - (a-1)
e = b + (a-1)
lst = list(range(s, e+1))
lst.sort()
print(*lst)

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
l = [i for i in range(x-k+1,x+k)]
print(" ".join(map(str,l)))

Submission status: Accepted

Solution code:
K,X=[int(e) for e in input().split(' ')]
for i in range(2*(K-1)+1):
    print("{} ".format(X-(K-1)+i),end='')

Submission status: Accepted

Solution code:
#!/usr/local/bin/python3.7

K, X = map(int, input().split())

min_range = X - K + 1
max_range = X + K

ans = []

for i in range(min_range, max_range):
    ans.append(i)
for i in range(0, len(ans)):
    print(ans[i], end=" ")

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
ans = []
for i in range(x-k+1,x+k):
  ans.append(str(i))
print(" ".join(ans))

Submission status: Accepted

Solution code:
K, X = map(int, input().split(' '))

min_X = max(-1000000, X - K + 1)
max_X = min(1000000, X + K - 1)

stays = list(range(min_X, max_X+1))

print(' '.join([str(s) for s in stays]))

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
for i in range(x-k+1,x+k):
  print(i, end=' ')

Submission status: Accepted

Solution code:
def f_b():
    k, x = map(int, input().split())
    print(" ".join(map(str, range(x-k+1, x+k))))

if __name__ == "__main__":
    f_b()

Submission status: Accepted

Solution code:
N,A = map(int,input().split())
N = N-1
for i in range(A-N,A+N+1):
  print(i,"",end="")

Submission status: Accepted

Solution code:
k, x = map(int, input().split(' '))

left = x + (k - 1)
right = x - (k - 1)
for i in range(right,left + 1):
  print(i,' ', end='')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    K,X = map(int, input().split())
    for i in range(X - K + 1, X + K):
        print(i)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

K, X = map(int, input().split())
K = K - 1
ans = map(str,[i for i in range(X-K,X+K+1)])
print(" ".join(ans))

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
for i in range(max(x - k + 1, -1000000), min(x + k - 1, 1000000) + 1):
  print(i, end = " ")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(b-a+1,b+a-1):
    print(i,end=' ')
print(b+a-1)

Submission status: Accepted

Solution code:
k,x = map(int, input().split())

for i in range(x-k+1, x+k):
  print(i)

Submission status: Accepted

Solution code:
lines = range(-1000000,1000001)
k, x = [int(n) for n in input().split()]
print(*list(lines[1000000+(x-k+1):1000000+(x+k)]))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
LR = range(X - K + 1, X + K)
print(' '.join(map(str, LR)))

Submission status: Accepted

Solution code:
K,X=map(int,input().split())

min1 = max([X-K+1,-1000000])
max1 = min([X+K-1,1000000])
for i in range(min1,max1+1):
    print(i,end=" ")

Submission status: Accepted

Solution code:
from sys import exit, stdin
K, X = [int(_) for _ in stdin.readline().rstrip().split()]
print(*[i for i in range((X-K+1), (X+K))])

Submission status: Accepted

Solution code:
def iread():
    return int(input())


def sread():
    return input()


def aread(t="int"):
    if t == "int":
        ret = [int(i) for i in input().split()]
    elif t == "str":
        ret = list(input())
    return ret


def scan():
    return list(map(int, input().split()))
    


def main():
    k, x = scan()
    r = range(x - k + 1, x + k, 1)
    for i in r:
        print('{} '.format(i), end="")
    print("")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K, X=map(int, input().split())
START=X-K+1
GOAL=X+K
LIST=[]
for i in range (START,GOAL):
  LIST.append(i)
print(*LIST)

Submission status: Accepted

Solution code:
def main():
    (k, x) = map(int, input().split())

    min_n = max(-1000000, x - k + 1)
    max_n = min(1000000, x + k - 1)

    print(' '.join(map(str, range(min_n, max_n + 1))))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k, x=map(int, input().split())
ans=""
for i in range(x-k+1, x+k):
    print(str(i) + " ")

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
for i in range(x-k+1,x+k):
  print(i,end=' ')

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
tmp = [str(y) for y in range(x-k+1, x+k)]
print(' '.join(tmp))

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
print(' '.join(map(str, range(X-K+1, X+K))))

Submission status: Accepted

Solution code:
#input 2 integers K and X
K,X = (int(x) for x in input().split())

#define answer vaiable
for x in range(X-(K-1), X+K):
    print(x, end=' ')

Submission status: Accepted

Solution code:
def main():
    K, X = map(int, input().split())
    ans = list(range(X-K+1, X+K))
    print(*ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k,x =map(int,input().split())
s =[]
for i in range(x-k+1,x+k):
	if -1000000<=i<=1000000:
		s.append(str(i))
print(' '.join(s))

Submission status: Accepted

Solution code:
#34 ABC137B
k,x=map(int,input().split())
print(" ".join([str(i) for i in range(x-k+1,k+x)]))

Submission status: Accepted

Solution code:
a,b = map(int,input().split(" "))
ar = []
for i in range(b-(a-1),b+a):
    ar.append(i)
for i in range(len(ar)-1):
    print(ar[i],end=" ")
print(ar[len(ar)-1])

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
ans = list(range(X-K+1, X+K))

for i in range(len(ans)):
    print(ans[i], end = " ")

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
c = ""
for i in range(b -a+1, b+a):
	c = c + str(i) + " "
print(c)

Submission status: Accepted

Solution code:
k, x = map(int,input().split())

for i in range(2*k-1):
  print(x-k+1+i, end = " ")

Submission status: Accepted

Solution code:
K, X = [int(i) for i in input().split(' ')]
min_ = -1000000
max_ = 1000000
result = []
for i in range(max(X - K + 1, min_), X):
    result.append(i)
for i in range(X, min(X + K, max_)):
    result.append(i)
print(' '.join([str(i) for i in result]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

for i in range (b-a+1,a+b):
    print(i,end="")
    print(" ",end="")

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
print(*range(x-k+1, x+k))

Submission status: Accepted

Solution code:
x=input().split()

x[0]=int(x[0])
x[1]=int(x[1])

for i in range(x[1]-x[0]+1,x[1]+x[0]):
    print(i)

Submission status: Accepted

Solution code:
a = []

a = input().split()

K = int(a[0])

X = int(a[1])

b = []

for i in range(2 * K -1) :
	b.append(X - (K - 1 - i))
	print(b[i], ' ', )

Submission status: Accepted

Solution code:

k, x = map(int, input().split())
print(" ".join(map(str, [i for i in range(x-k+1, x+k)])))

Submission status: Accepted

Solution code:
K,X = list(map(int,input().split()))

for i in range(X - K + 1, X + K):
    print(i, end =" ")