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:
inp = [int(v) for v in input().split(' ')]
k = inp[0]
x = inp[1]

minv = x - k + 1
maxv = x + k - 1
for v in range(minv, maxv + 1):
    if v != maxv:
        print(str(v) + ' ', end = "")
    else:
        print(str(v))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
rng = K - 1
ans = ""
for i in range(X - rng, X + K):
  if i == X + rng:
    ans += str(i)
  else:
    ans += str(i) + " "
print(ans)

Submission status: Accepted

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

print(result)

Submission status: Accepted

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

ans = ""
for i in range(a*2-1):
    ans += str(b-a+1+i)
    if i != a*2-1-1:
        ans += " "
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K,X =map(int,input().split()) #k ko #X is black

#−1000000~1000000

i=max([-1000000,X-K+1])
j=min([1000000,X+K])

result=""

while i<j:
  result =result+" "+str(i)
  
  i=i+1

#print(result)
print(result[1:])

Submission status: Accepted

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

val=x-k+1

while val<k+x:
	print(val)
	val=val+1

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
a=list(range(y-x+1,x+y))
b=[i for i in a if (i>-1000001)&(i<1000001)]
print(' '.join(map(str,b)))

Submission status: Accepted

Solution code:
k,x=(int(x) for x in 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())
start=x-k+1
end  =x+k-1
for i in range(start,end+1):
  print(i, end=" ")

Submission status: Accepted

Solution code:
K,X = (int(i) for i in input().split())

ans = []
for i in range(K):
    Y = X - i
    if Y >= -1000000:
        ans.append(Y)
    
for i in range(1,K):
    Y = X + i 
    if Y <= 1000000:
        ans.append(Y)

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

Submission status: Accepted

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

l = list(range(x-k+1, x+k))
print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k,x =map(int,input().split())
cons=2000001
mn_cons=int(-1000000)
mx_cons=1000000


mn=x-k+1
mx=x+k

if mn<=mn_cons:
    mn=mn_cons
if mx>=mx_cons:
    mx=mx_cons+1

r=range(mn,mx)
print(" ".join(list(map(str,r))))

Submission status: Accepted

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

s = x-k + 1
e = x+k

print(' '.join(map(str, range(s, e))))

Submission status: Accepted

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

kazu = k-1

if x-kazu<=-1000000:
    min = -1000000
else:
    min = x-kazu

if x+kazu>=1000000:
    max=1000000
else:
    max=x+kazu

[print(i) for i in range(min,max+1)]

Submission status: Accepted

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

Submission status: Accepted

Solution code:

L = map(int, raw_input().split())
K = L[0]
X = L[1]

f = X - K + 1
l = X + K 

ans = []

for i in range(f, l):
    ans.append(str(i))

print " ".join(ans)

Submission status: Accepted

Solution code:
def main():
    s = input()
    [k, x] = [int(number) for number in s.split()]

    min = x - k + 1
    max = x + k - 1
    i = min
    list = []
    for i in range(k * 2 - 1):
        list.append(min + i)
    print(' '.join([str(num) for num in list]))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

place = b
deff = a - 1

below_pls = place - deff
above_pls = place + deff
if below_pls < -1000000:
    below_pls = -1000000
if above_pls > 1000000:
    above_pls = 1000000

lst = list(range(below_pls, above_pls + 1))
print(' '.join(map(str, lst)))

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
s=x-k+1
e=x+k

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

Submission status: Accepted

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

st = max(x-k,-1000000)
gl = min(x+k, 1000000)

for i in range(st+1,gl):
	print(i)

Submission status: Accepted

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


left = X - (K-1)
right = X + (K-1)

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

Submission status: Accepted

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

out = []
for i in range(-(k-1),k):
        if (-1000000 <= x+i) and (x+i <=1000000):
                # out.append(x+i) 
                print(x+i)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    k, x = map(int, input().split())
    k = k-1
    max = k+x+1
    min = x -k
    a =range(min,max,1)
    ans = ""
    for i in a:
        if len(ans) > 0:
            ans = ans + " "+ str(i)
        else:
            ans = str(i)
    print(ans)

Submission status: Accepted

Solution code:
#coding: utf-8

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


min_x = -1000000
max_x = 1000000

mod_min_x = X - (K-1)
mod_max_x = X + (K-1)

x_list = ""
while mod_min_x <= mod_max_x:
    x_list = x_list + "%s " % mod_min_x
    mod_min_x = mod_min_x + 1

print(x_list)

Submission status: Accepted

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

a = 2000001
n = 1000000

A = [str(i - n) for i in range(a)]

b_min = max(-n, x - k + 1) + n
b_max = min(n, x + k) + n

C = A[b_min : b_max]
C =" ".join(C)
print(C)

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 = (int(i) for i in input().split())  

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

print(*ans)

Submission status: Accepted

Solution code:
s_min = -1000000
s_max = 1000000
K, X = map(int, input().split())


b_min = X - K + 1
while b_min < s_min:
    b_min += 1

b_max = X + K - 1
while b_max > s_max:
    b_max -= 1


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

Submission status: Accepted

Solution code:
i = list(map(int,input().split()))
s = i[0] - 1
g = []

mn = i[1] - s
mx = i[1] + s

for f in range(mn,mx+1):
    g.append(str(f))

L=' '.join(g)
print(L)

Submission status: Accepted

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

a = X-K+1
b = X+K-1
li = []
for i in range(a,b+1):
    li.append(i)

for s in li:
    print(s, end =" ")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for i in range(k):
  ans.insert(0, str(x - i))

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

print(' '.join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

s = []

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

s = map(str, s)

l = ' '.join(s)

print(l)

Submission status: Accepted

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

for i in range(x-k+1,x):
    if i >= -1000000:
        print(i)
for i in range(x,x+k):
    if i <= 1000000:
        print(i)

Submission status: Accepted

Solution code:
k, x = [int(col) for col in input().split(' ')]
max_prob = x + k - 1
min_prob = x - k + 1

rslt = [str(col) for col in range(min_prob, max_prob + 1)]
rslt = ' '.join(rslt)
print(rslt)

Submission status: Accepted

Solution code:
# coding: utf-8
a = list(map(int, input().split(" ")))
x = a[0] - 1
y = a[1] - x
z = x * 2 + 1
p = y

for i in range(z):
    if i > 0:
        print(" ", end="")
    print(p, end="")
    p = p + 1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split(" "))
if x-(k-1)<-1000000:
    mi=0
else:
    mi=x-(k-1)
s=[x-(k-1)]
i=1
while i!=2*k-1:
    if (x-(k-1)+i)>1000000:
        break
    else:

        s.append(x-(k-1)+i)
        i+=1
print(" ".join(map(str,s)))

Submission status: Accepted

Solution code:
import math

K,X=list(map(int,input().split()))
imin = X-K+1
imax = X+K-1
rmin = -1000000
rmax = 1000000
if imin >= rmin and imax <=rmax:
    for i in range(imin,imax+1):
        print(i,end=" ")
elif imin < rmin and imax <=rmax:
    for i in range(rmin,imax):
        print(i,end=" ")
elif imin >= rmin and imax >rmax:
    for i in range(imin,rmax):
        print(i,end=" ")

Submission status: Accepted

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

s = x - k + 1
e = x + k - 1
ls = []
for i in range(s, e+1):
  ls.append(i)
print(" ".join(map(str, ls)))

Submission status: Accepted

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

m = [str(i) for i in range(x-k+1,x+k)]

s = ''

for i in range(len(m)):
    s = s+m[i]+' '

print(s)

Submission status: Accepted

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

bottom = max(-100000, known-katamari+1)
top = min(100000, known+katamari)
i = bottom
while i < top:
    print(i, end = " ")
    i += 1

Submission status: Accepted

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

print(' '.join([str(i) for i in range(max(-1000000,x-k+1),min(1000000,x+k-1)+1)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, M = [int(s) for s in input().split()]
lb = max([-1000000, M-K+1])
ub = min([1000000, M+K-1])
print(' '.join([str(i) for i in list(range(lb, ub+1))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = [int(i) for i in input().split()]
x_plus = n[1] + 1000000
res = []
for i in range(x_plus-n[0]+1, x_plus+n[0]):
    res.append(str(i-1000000))
print(" ".join(res))

Submission status: Accepted

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

if x-k+1>=-100000:
  if x+k-1<=100000:
    for i in range(2*k-1):
      print(x-k+1+i)

  else:
    for i in range(100000-x-k+1):
      print(100000-x-2*k+1+i)

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

Submission status: Accepted

Solution code:
K,X   = map(int, input().split())
x_max=X+K-1
x_min=X-K+1
if x_max>1000000:
    x_max=1000000
if x_min<-1000000:
    x_min=-1000000
    
ans=[]
for i in range(x_min,x_max+1):
    ans.append(i)
print(*ans)

Submission status: Accepted

Solution code:
n = 2000001
kagen = -1000000
jogen = 1000000
k, x = map( int, input().split() )

ans = ""
for i in range( x - (k-1),  x + (k-1)+1 ) :
	if i < kagen :
		continue
	if jogen < i :
		continue
	ans += str( i ) + " " 

#ans = ans[:-2]
print( ans.strip() )

Submission status: Accepted

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

l = x-k+1
r = x+k-1

ans = []
a = ""

if l < -1000000:
    l = -1000000
if r > 1000000:
    r = 1000000
for i in range(l,r+1):
    ans.append(i)
for i in range(len(ans)):
    a += " " + str(ans[i])
print(a)

Submission status: Accepted

Solution code:
k, x = input().split(' ')
k, x = int(k), int(x)   
arr = []
         
for i in range(k): 
  arr.append(x-i)
  arr.append(x+i)
arr = list(set(arr))
arr.sort()
text = ""
for i in range(len(arr) - 1):
  text += str(arr[i]) + " "
print(text + str(arr[len(arr) - 1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = (int(i) for i in input().split())

print(' '.join(map(str, list(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, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

# input
k,x = [int(x) for x in stdin.readline().rstrip().split()]

# output
res = []
for i in range(k-1):
    n = x-(i+1)
    if -1000000 <= n and n <= 1000000:
        res.append(n)
res.append(x)
for i in range(k-1):
    n = x+(i+1)
    if -1000000 <= n and n <= 1000000:
        res.append(n)
res.sort()
res = map(str, res)
print(" ".join(res))

Submission status: Accepted

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

result = []
for i in range(2*K-1):
    result.append(X-K+1+i)

print(*result)

Submission status: Accepted

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

min = k-1
n = x - min

for a in range(min *  2 + 1):
  print(n)
  n = n + 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    k, x = map(int, input().split())
    f = x-k+1 if x-k+1 > -1000000 else -1000000
    l = x+k-1 if x+k-1 < 1000000 else 1000000
    ans = [i for i in range(f, l+1)]
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

x1 = x - k + 1
x2 = x + k

l = list(map(str, list(range(x1, x2))))
s = ' '.join(l)
print(s)

Submission status: Accepted

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

stt = x - (k - 1)
end = x + k
intrange = range(stt, end)
strrange = [str(i) for i in intrange]

print(' '.join(strrange))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
n = 2*(10**6)+1

l = []

for i in range(x-k+1,x+k):
    l.append(i)
else:
    print(" ".join(map(str, l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
mi = max(-1000000,x-k+1)
ma = min(1000000,x+k-1)
l = list(range(mi,ma+1))
# li=l[mi:(ma+1)]
print(' '.join(map(str, l)))

Submission status: Accepted

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

a = max(X - K + 1, -1000000)
b = min(X + K -1, 1000000)

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

print(" ".join(res))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a=x-k
b=list()

for i in range(a+1,x+k):
  b.append(i)
  
print(*b)

Submission status: Accepted

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

result=''

for i in reversed(range(k)):
  result+=str(x-i) + ' ' 

for j in range(1, k):
  if j==k-1:
    result+=str(x+j)
  else:
    result+=str(x+j) + ' ' 
  
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print(str(list(range(B-(A-1),A+B))).strip('[').strip(']').replace(',',''))

Submission status: Accepted

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

M = min(X + K - 1, 1000000)
m = max(X - K + 1, -1000000)

A = [i for i in range(m, M + 1)]
print(' '.join(map(str, A)))

Submission status: Accepted

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

Submission status: Accepted

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

K = KX[0]
X = KX[1]

MIN = X - (K-1)
MAX = X + (K-1)+1

lis = list(range(MIN,MAX))

for i in range(len(lis)):
    print("{}".format(lis[i]), end="")
    if i == len(lis)-1:
        # print("sss")
        continue
    else:
        print(" ", end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N,M = map(int,input().split())

a = M - N + 1
b = M + N
c= list(range(a,b))
print(' '.join(map(str, c)))

Submission status: Accepted

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


def solve(K: int, X: int):
    print(' '.join(map(str, range(X - K + 1, X + K))))


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(X-K+1, X+K):
  if -1000000 <= i and i <= 1000000:
    ans.append(str(i))
print(" ".join(ans))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
MIN = -1000000
MAX = 1000000+1

print(*list(range(max(MIN, X - K + 1), min(MAX, K + X))))

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(str(i), end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n=int(input())
#L=list(map(int,input().split()))
k,x=map(int,input().split())
#A=[[0 for i in range()] for j in range()]
sita=max(-1000000,x-k+1)
ue=min(1000000,x+k-1)
l=[]

for i in range(sita,ue+1):
  l.append(i)
print(*l)

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
start = max(-1000000,x-k+1)
for i in range(k*2-1):
    if start+i > 1000000:
        break
    print(start+i)

Submission status: Accepted

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

st = ""
for i in range(200000):
    if (X-K+1) <= i-100000 and i-100000<= (X+K-1):
        st = st +str(i-100000)+" "

print(st)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
array = input().split()
K = int(array[0])
X = int(array[1])
Start = X - K + 1
Goal = X + K
for i in range(Start, Goal):
  print(str(i) + " ", end = "")

Submission status: Accepted

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

ans = []

for i in range(K,1,-1):
    ans.append(str(X-i+1))

ans.append(str(X))

for i in range(1,K):
    ans.append(str(X+i))

print(' '.join(ans))

Submission status: Accepted

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

if k ==1:
	print(x)
else:
	a = x - k + 1
	b = x + k
	z = list(range(a,b))
	print(' '.join(map(str, z)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    ins = input().split(' ')
    k = int(ins[0])
    x = int(ins[1])
    xs = range(max(x-k+1, -1000000), min(x+k, 1000001))
    xxx = list(map(lambda s: str(s), xs))
    print(' '.join(xxx))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

allstone = list(range(X-(K-1),X+(K)))

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split())) #input from array of integer like "1 2 3"


ans = []
n = 0
start = a[1]-a[0]+1
for i in range(a[0]*2-1):
  ans.append(start+n)
  n+=1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

S = np.arange(X-K+1, X+K)

if X-K+1 >= -1000000:
    if X+K-1 <= 1000000:
        print(*S)
    else:
        print(*np.arange(X-K+1, 1000001))
else:
    if X+K-1 <= 1000000:
        print(*np.arange(-1000000, X+K))
    else:
        print(*np.arange(-1000000, 1000001))

Submission status: Accepted

Solution code:
"""
https://atcoder.jp/contests/abc137/tasks/abc137_b
"""

import numpy as np


def calc(K: int, X: int) -> np.ndarray:
    _min_num = -1000000
    _stop_num = 1000000 + 1
    min_ = max(_min_num, X - (K - 1))
    stop = min(_stop_num, X + K)
    return np.array(range(min_, stop))


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    K, X = load_input_as_int_array()
    result = calc(K, X)
    print(" ".join([str(v) for v in result]))


main()

Submission status: Accepted

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

print(" ".join([str(n) for n in range(X-K+1,X+K)]))

Submission status: Accepted

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

Submission status: Accepted

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

# X - K-1 個　～　X + (k-1)
width = k - 1

left = x - width
right = x + width

if left < -1000000:
  left = -1000000
if right > 1000000:
  right = 1000000

print(' '.join([str(i) for i in range(left, right+1)]))

Submission status: Accepted

Solution code:

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


minimum = max(X-K+1,-1000000)
maximum = min(X+K-1,1000000)

correct= list(range(minimum,maximum+1))

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**9)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def LIST(): return [int(x) for x in input().split()]
MOD = 10**9 + 7

K, X = LIST()

start = max(-1000000, X-K+1)
end = min(1000000, X+K-1)

L = list(range(start, end+1))
print(' '.join(map(str, L)))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print ' '.join(map(str, range(x - k + 1, x + k)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[]
for x in input().split(" "):
    a.append(int(x))

b=[]
if a[1]-a[0]+1<-1000000:
    i=-1000000
    while i<a[1]+a[0]:
        b.append(str(i))
        i+=1
elif a[1]+a[0]-1>1000000:
    i=a[1]-a[0]+1
    while i<1000000:
        b.append(str(i))
        i+=1
else:
    i=a[1]-a[0]+1
    while i<a[1]+a[0]:
        b.append(str(i))
        i+=1

print(' '.join(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=map(int, input().split())
min_val = max(X-(K-1),-1000000)
max_val = min(X+(K-1), 1000000)
print(*range(min_val,max_val+1))

Submission status: Accepted

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

ans = ' '.join([str(i) for i in range(X - K + 1, X + K)])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
xmin=max(X-K+1,-1000000)
xmax=min(X+K-1,1000000)

for i in range(xmin,xmax+1):
    print(i,"",end="")

Submission status: Accepted

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

mi = x - (k-1)
ma = x + (k-1)

res = ""
for i in range(max(mi, -1000000), min(ma, 1000000)+1):
    res += str(i) + " "

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    K, X = map(int, input().split())
    logging.info("Hello!")

    min_x = X - K + 1
    max_x = X + K - 1

    ans = ""
    for i in range(min_x, max_x + 1):
        if i < -1000000:
            continue
        elif i > 1000000:
            break

        ans += str(i)
        ans += " "

    print(ans)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 10 21:04:27 2019

@author: kato yugo
"""

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

a = k-1

b = x-a
c = x+a

for i in range(b,c+1):
    if (-100000 <= i <= 1000000):
        print(i, end="")
        print(" ", end="")