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())
print(" ".join(map(str, [i for i in range(x-k+1, x+k)])))

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:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

mn,mx = -1000000,1000000

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

mn = max(mn,x-k+1)
mx = min(mx,x+k-1)
print(" ".join([str(i) for i in range(mn,mx+1)]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

K, X = [int(x) for x in stdin.readline().rstrip().split()]
ans = [x for x in range(max(X - (K - 1), -1000000), min(X + K, 1000001))]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
IN = input()
K, X = [int(x) for x in IN.split()]
B = [x for x in range((X-K+1),(X+K))]
print(str(B).replace(",","")[1:-1])

Submission status: Accepted

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

Submission status: Accepted

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

K = inputNum[0]
X = inputNum[1]

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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:
K, X = map(int, input().split())

ans = [i for i in range(X-K+1,X+K)]

for j in ans:
    print(j, end=" ")

Submission status: Accepted

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

minint = max(-1000000, x-k+1)
maxint = min(1000000, x+k)

for i in range(minint, maxint):
    print(i, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Coding:utf-8

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

Submission status: Accepted

Solution code:
n = list(map(int, input().split()))
k = n[0]
x = n[1]
s1 = x - k + 1
s2 = x + k - 1
a1 = list(range( (s1), (s2 + 1)  ))
print(" ".join(list(map(str, a1))))

Submission status: Accepted

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

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())
lowest = max(-10000000, X - K + 1)
highest = min(10000000, X + K - 1)
ans = list(map(str,[i for i in range(lowest, highest+1)]))
print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(map(int, input().split(' ')))
k = s[0]
x = s[1]

min = 1000000*-1
max =  1000000


if x-k+1 > min:
  min = x-k+1

if x+k < max:
  max = x+k

for i in range(min,max):
	print(i,end=' ')
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Len, Pos = map(int, input().split())
Left = -1000000
Right = 1000000

candL = max(Pos-Len+1, Left)
candR= min(Pos+Len-1, Right)

cand = [x for x in range(candL, candR+1)]
ans = ''

for s in cand:
  ans += str(s) + ' '
  
print(ans.rstrip())

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
gi = lambda : list(map(int,input().split()))
a, b = gi()
print(*range(b - a + 1, b + a))

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

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 = input().split()
k = int(k)
x = int(x)
x1 = x - (k - 1)
x2 = x + k
for i in range(x1, x2):
  print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
a = max(-1000000, x-k+1)
b = min(1000000, x+k-1)
#print(a, b)

ans = []
for i in range(a, b+1):
    ans.append(str(i))

#print(ans)

ans = ' '.join(ans)
print(ans)

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
res = []
N = 1000000
if x - k + 1 < -N:
	res = list(range(-N, -N + k))
elif x + k - 1 > N:
	res = list(range(N - k + 1, N + 1))
else:
	res = list(range(x - k + 1, x + k))
print(" ".join([str(x) for x in res]))

Submission status: Accepted

Solution code:
k, x = [int(x) for x in 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=[]
for i in range(x-k+1,x+k):
    ans.append(i)
print(*ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if(a==1):
    print(b)
else:
    e=b-(a-1)
    while(e<=(b+(a-1))):
        print(e,end=' ')
        e+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC137B - One Clue
def main():
    K, X = tuple(map(int, input().rstrip().split()))
    mi, ma = max(-1000000, X - K + 1), min(1000000, X + K - 1)
    ans = [i for i in range(mi, ma + 1)]
    print(*ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

readline = stdin.readline


def main():
    k, x = map(int, open(0).readline().split())
    print(*range(x-k+1, x+k))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(max(-1000000,x-k+1), min(1000000,x+k)):
    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:
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())
s=""
for i in range(x-k+1,x+k):
  s=s+str(i)+" "
s=s[:-1]
print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
k, x = map(int, input().split())

# 文字列の入力
ans = list(range(x-k+1,x+k,1)) 

# 出力
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
END = 10**7
dx = k-1
ans = [str(i) for i in range(max(x-dx, -END), min(x+k, END))]
print(' '.join(ans))

Submission status: Accepted

Solution code:
# coding: utf-8
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(" "))
x_min = X-K+1
x_max = X+K-1
r = [str(i) for i in range(x_min,x_max+1)]
print(" ".join(r))

Submission status: Accepted

Solution code:
k, x = (int(i) for i in input().split())
l = x - k + 1
r = x + k - 1
if l < -1000000:
  l = -1000000
if r > 1000000:
  r = 1000000
print(*list(range(l,r+1)))

Submission status: Accepted

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

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

an=map(str,ans)
a=' '.join(an)
    
print(a)

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())
ans = list(map(str, range(x - k + 1, x + k)))
print(' '.join(ans))

Submission status: Accepted

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

min_n = max(-1000000, x-k+1)
max_n = min(1000000, x+k-1)
ans = list(range(min_n, max_n+1))
ans = [str(x) for x in ans]
print(" ".join(ans))

Submission status: Accepted

Solution code:
while True:
    try:
        K, X = map(int, input().split())
        print(' '.join(map(str, range(X - K + 1, X + K))))
    except EOFError:
        break

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = list(map(int, input().split()))
minimum = X - (K-1)
MAXIMUM = X + (K-1)
if minimum < -1000000:
  minimum = -1000000
if MAXIMUM > 1000000:
  MAXIMUM = 1000000
  
for x in range(minimum,MAXIMUM+1):
  print(str(x), end=" ")
  
print()

Submission status: Accepted

Solution code:
import numpy as np

K, X = map(int, input().split())
Ans = np.arange(X-K+1, X+K)
print(*Ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=[]
for i in range(-a+1,a):
  if -1000000<=b+i<=1000000:
    c.append(b+i)
    
print(" ".join(map(str,c)))

Submission status: Accepted

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

xm=x-(k-1)
xl=x+(k-1)
for i in range(xm,xl+1):
    print(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(i)
print(*ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
k, x = list(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())

a=max(-100000,x-k+1)
b=min(100001,x+k)

res=list(range(a,b))
res=[str(i) for i in res]
print(" ".join(res))

Submission status: Accepted

Solution code:
def find(K,X):
    left=-10**6
    right=10**6
    ans=[]
    for i in range(X-K+1,X+K):
        if i>=left and i<=right:
            ans+=[str(i)]
    print(" ".join(ans))
K,X=list(map(int,input().strip().split(' ')))
find(K,X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

#sys.stdin = open("second.txt","r")

def main():
	k, x = map(int, raw_input().split())
	for i in xrange(x - k + 1, x + k):
		print i,
	print ""

raw_input = sys.stdin.readline

if __name__ == '__main__':
	#for j in xrange(int(raw_input())):
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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())
left = x - k + 1
right = x + k - 1

ptn = []
for i in range(left, right+1):
    ptn.append(i)

print(*ptn)

Submission status: Accepted

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

ans = list(range(X-K+1,X+K))
print(' '.join(map(str,ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = 1+2*(K-1)
a = [0] * N
for i in range(N):
    a[i] = X - (K-1) + i


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

Submission status: Accepted

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

print()

Submission status: Accepted

Solution code:
import numpy as np
i = list(map(int, input().split()))
K = i[0]
X = i[1]
start_point = X - K+1
end_point = X + K
result = np.arange(start_point, end_point)
for i in result:
    print(i)

Submission status: Accepted

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

nmin = x - k + 1
nmax = x + k - 1

ans = [i for i in range(nmin,nmax + 1)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,z = map(int, input().split())
start = z - k +1
end = z + k -1
seq = list(range(start, end+1))
print(*seq)

Submission status: Accepted

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

st = X - K + 1

en = X + K - 1

if st <= -1000000: st = -1000000

if en >= 1000000: en = 1000000

for i in range(st, en + 1):
    print(i, end = ' ')

Submission status: Accepted

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

minx = max([x-k+1, -1000000])
maxx = min([x+k-1, +1000000])

i = minx
while i <= maxx:
    print (i)
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = [int(v) for v in input().split(" ")]

t=" ".join([str(v+x) for v in range(-k+1,k)])
print(t)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
if K == 1:
    print(X)
    exit()
checkpoint = X
result = set()
start = checkpoint - K + 1
for i in range(K):
    for i in range(K):
        result.add(start + i)
    start = start + 1
result = sorted(result)
L=[str(a) for a in result]
L=" ".join(L)
print(L)

Submission status: Accepted

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

k = int[0]
x = int[1]

p=x + 1 
q=p - k
r=x + k

s =list(range(q,r))
print(*s)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import re
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()
 
K,X = MULT_INT_LIST()
ans = []
kuro_min = X-K+1
kuro_max = X+K-1
for i in range(kuro_min,kuro_max+1):
    ans.append(i)
ans = str(ans)
ans = ans.replace(",", "")
ans = ans.strip('[]') 
print(ans)

Submission status: Accepted

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

c = b + a - 1
d = b - a + 1

n_list = []

if c == d:
    print(c)
elif c != d:
    max_n = max(c,d)
    min_n = min(c,d)
    for i in range(min_n, max_n+1):
        n_list.append(i)
    
# for i in n_list:
#     print(i, end ="")
print( " ".join( repr(e) for e in n_list ) )

Submission status: Accepted

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

Submission status: Accepted

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

min_b = max(-1000000, x - (k - 1) )
max_b = min(1000000, x + (k - 1) )
ans = []
for i in range(min_b, max_b + 1):
  ans.append(str(i))
print(" ".join(ans))

Submission status: Accepted

Solution code:
mi = lambda: map(int, input().split())

K, X = mi()
r = [X]
for i in range(1, K):
    r.append(X - i)
    r.append(X + i)
r.sort()
print(' '.join(map(str,r)))

Submission status: Accepted

Solution code:
k,x= map(int, input().split())
#-10000, 10000の制約に注意して
#x-k+1から始まってx+k-1で終わる
number = []
number.append(x)
for i in range(1,k):
    number.append(x+i)
    number.append(x-i)
number.sort()
for m in number:
    if m >1000000 or m<-1000000:
        number.pop(m)
for n in number:
    print(n, end=' ')

Submission status: Accepted

Solution code:
import sys
import re
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

K,X = MULT_INT_LIST()
ans = []
kuro_min = X-K+1
kuro_max = X+K-1
for i in range(kuro_min,kuro_max+1):
    ans.append(i)
ans = str(ans)
ans = ans.replace(",", "")
ans = ans.strip('[]') 
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
res = []
for i in range(b-a+1,b+a):
    if i > -1000000 or i < 1000000:
        print(i,end=" ")

Submission status: Accepted

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

ans=[]

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

ans=set(sorted(ans))
ans=sorted(list(ans))

for j in ans:
    print(j,end=" ")

Submission status: Accepted

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


a.remove(X)
a.sort(reverse=False)

for j in range(2*K-1):
    x=a[j]
    print(x,end=' ')

Submission status: Accepted

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

minI = -(10**6)
maxI = (10**6)

Is = [0 for _ in range(2*(10**6)+1)]

for i in range(X,max(minI,X-K),-1):
	Is[i] = 1
	
for i in range(X,min(maxI,X+K)):
	Is[i] = 1
	
for i in range(minI,maxI):
	if Is[i] == 1:
		print(i,end=" ")

Submission status: Accepted

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

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

sorted_list = sorted(list(set(arr)))

result =  " ".join(map(str, sorted_list))
if (k == 1):
  result = x


print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

U = 10 ** 6
K,X = map(int,input().split())

L = X - K + 1
R = X + K - 1
L = max(L,-U)
R = min(R,U)

print(*range(L,R+1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(K: int, X: int):
    res = [X]

    # right
    for i in range(X + 1, X + K):
        res.append(i)

    # left
    for i in range(X - 1, X - K, -1):
        res.append(i)

    for i, x in enumerate(sorted(res)):
        print(x, end='')
        if not res.__len__() == i + 1:
            print(end=' ')

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    solve(K, X)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

output_list = []

for diff in range(X-(K-1), X+(K)):
    output_list.append(str(diff))
print(" ".join(output_list))

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 = [int(i) for i in input().split(" ")]
li = []
li1 = []
for i in range(K):
    ans = X - i
    li.append(ans)
    ans1 = X + i
    li1.append(ans1)
    
k = li[::-1] + li1[1:]
for ele in k:
    print(ele , end = " ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import numpy as np
# import copy

def main():

    k,x = [int(i) for i in input().split(' ')]
    # ishi = 2000001
    # mn = -1000000
    # mx = 1000000

    saisyo = x - k 

    saidai = x + k -1

    res = []
    while True:
        if saisyo >= saidai:
            break
        saisyo = saisyo + 1
        res.append(saisyo)

    res = [str(i) for i in res]
    print(' '.join(res))


    

    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

maxPoint = X+K
minPoint = X-K+1

list=list(range(minPoint,maxPoint,1))
for i in list:
    print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x = range(b-a+1,b+a)
y = list(x)
print(" ".join(map(str, y)))

Submission status: Accepted

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

i_beg = k-(x-1)
i_end = k+(x-1)

str_ret = ''
for i in range(i_beg, i_end+1):
  if i >= -1000000 and i <= 1000000:
    str_ret += str(i) + ' '
print(str_ret.strip())

Submission status: Accepted

Solution code:
#整数の入力

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

#初期値は X - (K - 1) で、(K*2 - 2)回、1つずつ増えた数を出力する

P = X - (K - 1) # 出力初期値

R = K * 2 - 1 # 繰り返し範囲定義用

if R < 0:
  print(X)
  
else: i = 0 
while i < R:
    print(P)
    P = P + 1
    i = i + 1

Submission status: Accepted

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

start = x - k + 1
last = x + k - 1

result = []
result.append(start)

for i in range(1, last - start + 1):
    result.append(start + i)
for i in result:
    if i == start:
	    output = str(i)
    else:
        output = output + " " + str(i)

print(output)

Submission status: Accepted

Solution code:
# print(abs(-1000001) - abs(-1000000))
k,x = map(int , input().split())

mini = -1000000
maxi = 1000000

left = x-k+1
right = x+k-1

if left < mini:
    right = right + (abs(left) - abs(mini))
    left = mini
if right > maxi:
    left = left - (maxi - right)
    right = maxi
# print(left,right)
while left<=right:
    print(left,end=" ")
    left+=1

Submission status: Accepted

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

c = list(range(b,a+b))
d = list(range(b-1,b-a,-1))

e = list(reversed(d))

f = e + c

g = [str(h) for h in f]

i = " ".join(g)

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = K-1
count = X - k
for x in range(k*2+1):
    print(count)
    count += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

for i in range(x - k + 1, x + k):
    if i < -1000000 and 1000000 < i:
        next
    print(i, end=" ")
print()

Submission status: Accepted

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

start = x - k + 1
end   = x + k - 1

if start < -1000000:
    start = -1000000
if end > 1000000:
    end = 1000000

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
l=[]
if x-k>-1000000 and x+k<1000000:
  l=list(range(x-k+1,x+k))
elif x-k<=-1000000:
  l=range(-1000000,x+k)
elif x+k>=1000000:
  l=range(x-k+1,1000000+1)
for i in l:
  print(str(i)+' ',sep='',end='')

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
for i in range(2*a[0]-1):
    print(a[1]-a[0]+i+1,end=' ')

Submission status: Accepted

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

min_val = max(-1000000, X - (K - 1))
max_val = min(1000000, X + (K - 1))

print(" ".join([str(x) for x in list(range(min_val, max_val+1))]))

Submission status: Accepted

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

ans = []
a = x - k + 1


for i in range(0, 1+(k-1)*2):
  ans.append(a+i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
k = K-1
l = list(range(X-k,X+k+1))
L = list(map(str,l))
print(" ".join(L))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i in range(2*a-1):
 print(b-a+i+1)
 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="")
    print(" ",  end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for i in range(X-K+1, X+K):
    if -1000000 <= i <= 1000000:
        ans.append(i)
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
mylist = []
for row in range(a):
  c = row+b
  mylist.append(c)
for row in range(a):
  c = -row+b
  mylist.append(c) 
mylist = sorted(set(mylist))
for row in mylist:
	print(row,end=' ')

Submission status: Accepted

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

for i in range(max(X-K+1+1000000, 0),min(X+K+1000000, 2000001)):
  print(i-1000000)

Submission status: Accepted

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

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

print(X+K-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:
K,X = map(int, raw_input().split())
s,e = max(X-K+1,-1000000), min(X+K-1, 1000000)
print " ".join(map(str, range(s,e+1)))

Submission status: Accepted

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

max_ = X + (K-1)
min_ = X - (K-1)

res = ""
for i in range(min_, max_+1):
    if i <= 1000000 and i >= -1000000:
        res += (str(i) + " ")

print(res[:-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from __future__ import print_function
 
k, x = map(int, raw_input().split())
 
for i in range(x-(k-1),x+k):
    print (str(i) + " " ,end="")