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:
n=[int(i) for i in input().split()]
for i in range(-(n[0]-1),n[0]):
  print(n[1]+i,end=" ")

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:
k,x = map(int,input().split())
start = -1000000
end = 1000000

if x -(k-1) >= start:
    start =  x -(k-1)
if x + (k-1) <= end:
    end = x + (k-1)
a = [n for n in range(start,end+1)]
print(' '.join(map(str,a)))

Submission status: Accepted

Solution code:
def main():

    K, X = map(int, input().split()) 
    lst = []
    for i in range(X - K + 1, X + K):
        lst.append(i)
    print(*lst)
    
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:
# coding: utf-8
# Your code here!
k,x=map(int,input().split())

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

Submission status: Accepted

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

m=X-(K-1)
n=X+(K-1)



for i in range(m, n+1):
  print(i, end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
def ii(): return int(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def li(): return list(mi())
def si(): return stdin.readline()
k, x=mi()
for i in range(x-k+1, x+k):
    print(i, end=' ')

Submission status: Accepted

Solution code:
import numpy as np

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

max_num = X + K

min_num = X - K + 1

print(*np.arange(min_num, max_num))

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
for i in range(x-~-k,x+k):
    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,x+k):
        print(i,end=' ')

Submission status: Accepted

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

a = []

for i in range(k):
  a.append(x - i)

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

s_a = sorted(a)
#print(s_a)
for s in s_a:
  print(s, end =" ")

Submission status: Accepted

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

li= [str(X - k) for k in range(K-1,-K,-1)]

print(' '.join(li))

Submission status: Accepted

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

ans =[b]
for i in range(1,a):
  ans += (b-i,b+i)
  ans = sorted(ans)
  
s = ' '.join([str(n) for n in ans])
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(mi, ma):
    print(i, end=" ")
print(ma)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=b-a+1;d=b+a-1
ris=[]
for i in range(c,d+1):
    ris.append(str(i))
print(' '.join(ris))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
#AtCoder

import sys
import math
import itertools

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


"""

"""

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
min_x = X - K + 1
max_x = X + K - 1

for x in range(min_x, max_x+1):
    print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

ls =  list(range(X-K+1,X+K,1))
ans = ""

for x in ls:
    if -1000001<x and x<1000001:
        ans = ans + str(x) + " "

print(ans.strip())

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(-101,200): 
    if X-K < i < X+K:
        points.append(i)
print(' '.join(map(str, points)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
X,K = map(int,input().split())
a=list(np.arange(np.max([-1000000,K-X+1]),np.min([1000000,K+X])))
print(' '.join(map(str, a)))

Submission status: Accepted

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

def main():
    nyuuryoku = list(map(int, input().split()))
    k = nyuuryoku[0]
    x = nyuuryoku[1]
    num_list = []

    num_list.append(x)

    for i in range(k):
        if(x+i < 100000):
            num_list.append(x+i)

    for i in range(k):
        if(x-i > -100000):
            num_list.append(x-i)

    num_list_uniq = sorted(list(set(num_list)))
    print(*num_list_uniq)

if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

min_ = max(-1000000, x - k + 1)
max_ = min(1000000, x + k - 1)

print(' '.join(map(str, (i for i in range(min_, max_ + 1)))))

Submission status: Accepted

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

list_result = list(range(x-k+1 , x+k))
s = ""
for i in list_result:
    s = s + str(i) + " "

print(s[:-1])

Submission status: Accepted

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


output = " ".join([str(v) for v in range(X - (K - 1), X + K)])

print(output)

Submission status: Accepted

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

l = [int(i) for i in input().split(' ') for l in range(1)]
for i in range((l[1] - l[0] + 1), (l[1] + l[0])):
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

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())

min = X - (K - 1)

for i in range(2*K-1):
    print(min + i)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
K, X = list(map(int, input().split()))

l = X - K + 1
r = X + K - 1

ans_list = []
for i in range(l, r + 1):
    ans_list.append(str(i))

print(' '.join(ans_list))

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
li =  []
for i in range(k):
    if i == 0:
        li.append(x)
    else:
        li.append(x+i)
        li.append(x-i)

li.sort()
print(*li)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
answer = []
min_position = x - (k - 1)
max_position = x + (k - 1)
for i in range(min_position, max_position + 1):
    answer.append(i)
answer = sorted(answer)
for y in answer:
    print(y)

Submission status: Accepted

Solution code:
num_black,black=map(int,input().split())
if black+num_black<=1000000:
    right=black+num_black
else:
    right=1000000
if black-num_black>=-1000000:
    left=black-num_black
else:
    left=-1000000
for ans in range(left+1,right):
    print(ans,end="")
    if ans != right:
        print(" ",end="")
print()

Submission status: Accepted

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

for i in range(a):
    c.append(b-i)
    c.append(b+i)

c = set(c)

print(*sorted(c))

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
print(*[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())
i = X-K+1
while i < X+K:
    print(i)
    i+=1

Submission status: Accepted

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

l = []

for i in range(2*K - 1):
  l.append(str(X - K + 1 + i))
  
for _l in l:
  print(_l + " ",end="")
  
print("")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
btm = -1000000
top = 1000000

if (x - k + 1) >= btm:
  btm = x - k + 1
if (x + k - 1) <= top:
  top = x + k - 1
[print("%d " % i, end="") for i in range(btm, top + 1)]

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if k + x > 1000000 or k - x < -1000000:
    if x + k > 0:
        ans = [i for i in range(x - k + 1, 1000000 )]
    elif x - k < -1000000:
        ans = [i for i in range(-1000000, x + k - 1)]
else:
    ans = [i for i in range(x-k + 1, x+k)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit, stderr, stdin
input = stdin.readline
# setrecursionlimit(10**7)

def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    K, A = [int(n) for n in input().split()]
    for i in range(-K+1,K):
        print(A+i,end=" ")
    print()



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

n_list = [i for i in range(mi_X, ma_X+1)]
print(*n_list)

Submission status: Accepted

Solution code:
k, x = map(int,input().split())#標準入力を行う

a = x - k + 1
b = x + k

y = []

for i in range(a,b):
    y.append(i)
print(*y,sep=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
mn=m-n+1
mx=m+n-1
for i in range(mn,mx+1):
    print("%d "%(i),end="")

Submission status: Accepted

Solution code:
s = input().split()
stones = [i for i in range(-1000000, 1000001, 1)]
min, max = -1000000+(int(s[1])-int(s[0])), -1000001+(int(s[1])+int(s[0]))
for i in stones[min:max]:
    print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
k,x = I0()
a = x-k+1
a=range(x-k+1,x+k)
print(*a)

Submission status: Accepted

Solution code:
I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
k,x = I0()
a = x-k+1
res = list()
while a <= k+x-1:
    res.append(a)
    a+=1
print(*res)

Submission status: Accepted

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

start_point = X - K + 1
end_point  = X + K - 1

pos = [i for i in range(start_point, end_point+1)]

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

Submission status: Accepted

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

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 num in range(x-k+1,x+k):
  print(num)

Submission status: Accepted

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

Submission status: Accepted

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


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

    return ' '.join(res)


if __name__ == "__main__":
    k, x = map(int, input().split())
    print(main(k, x))

Submission status: Accepted

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

left = x - k + 1 if x - k + 1 >= -1000000 else -1000000
right = x + k - 1 if x + k - 1 <= 1000000 else 1000000

print(*range(left, right + 1))

Submission status: Accepted

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

Submission status: Accepted

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

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())
for i in range(X-K+1,X+K):
  print(i,end=" ")
print()

Submission status: Accepted

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

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 = list(map(int, input().split()))
numlist=[]

if k > 1:
    x -= k - 1
    for i in range(k*2 - 1):
        numlist.append(x + i)
else:
    numlist.append(x)

for value in numlist:
    print(value, end=" ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
s = set()
for i in range(X-K+1,X+K):
  s.add(i)
  
S = sorted(s)
print(' '.join(map(str, S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
t = b-a+1
s = 2*a-1
for i in range(s):
    print(t+i,end="")
    print(" ",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())
x_min = x-k+1
x_max = x+k
ans = [i for i in range(x_min, x_max)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def getlist():
    return list(map(int, input().split()))

K, X = getlist()

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

ans.append(X)

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

print(" ".join(list(map(str, ans))))

Submission status: Accepted

Solution code:
ns = input().split(" ")
k = int(ns[0])
x = int(ns[1])
l = [x]
if k == 1:
  print(l[0])
else:
  for i in range(1,k):
    np = x + i
    nm = x - i
    if np <= 20000:
      l.append(np)
    if nm >= -20000:
      l.append(nm)
  l2 = sorted(l)
  
  print(*l2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

R_X = K + X -1
L_X = X - K +1

for i in range(L_X,R_X+1):
    print(i,end=' ')

print('\n')

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())


result = list(range(x-k+1,x)) + list(range(x,x+k))
ans_L = list(set([i for i in result if (i>=-10000) or (i<=10000)]))

ans_L.sort()
ans_L = map(str,ans_L)

print(" ".join(ans_L))

Submission status: Accepted

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

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

Submission status: Accepted

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

plus = []
minus = []
result = []
for i in range(1, K):
    plus.append(X+i)
    minus.append(X-i)

result.extend(minus[::-1])
result.extend([X])
result.extend(plus)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
i=b+(a-1)
j=b-(a-1)
k=max(i,j)
l=min(i,j)
print(*list(range(l,k+1)))

Submission status: Accepted

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

Submission status: Accepted

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

print(*(range(max(-1000000,X-K+1),min(1000000,X+K-1)+1)))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = b+1-a
d = b-1+a

for i in range(c, d+1):
    print(i, end = " ")

Submission status: Accepted

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

Submission status: Accepted

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

outstring = str(X - (K - 1))

counter = -(K - 1) + 1
while counter < K:
  outstring += " "+str(X + counter)
  counter += 1
print outstring

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
right_idx_max = 0
left_idx = max(x - (k - 1), -1000000)

if left_idx == -1000000:
    right_idx = -1000000 + (k - 1)
else:
    right_idx = left_idx + (k - 1)


right_idx_max = right_idx + (k - 1)
print(" ".join(map(str, range(left_idx, right_idx_max + 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 = map(int, input().split())
lst = [i for i in range(x-k+1, x+k)]
print(*lst)

Submission status: Accepted

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

start = b-a+1+1000000
end = b+a+1000000

if start<0:
   start =0
if end>2000001:
   end = 2000001
num = list(range(-1000000,1000001))
ans = num[start: end]
print(*ans)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
stones = [x for x in range(-1000000, 1000001)]
index_X = stones.index(X)
print(*stones[index_X-K+1:index_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(str(i))
print(" ".join(ans))

Submission status: Accepted

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

K, X = [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
def blackstone(k,x):
    minimum = x-(k-1)
    maximum = x+(k-1)
    tmp = list(range(minimum,maximum+1))
    return ' '.join(map(str, tmp))
K,X = map(int, input().split())
print(blackstone(K,X))

Submission status: Accepted

Solution code:
K, X=map(int,input().split())
x=X-K+1
while x<=X+K-1:
  print(x)
  x+=1

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

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

xmin=x-k+1
xmax=x+k-1

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

Submission status: Accepted

Solution code:
inputs = input().split()
K = int(inputs[0])
N = int(inputs[1])
a = []
for i in range(N-K+1, N+K):
  a.append(str(i))
print(' '.join(a))

Submission status: Accepted

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

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
from sys import stdin

k, x = [int(v) for v in stdin.readline().rstrip().split()]
print(" ".join([str(v) for v in range(x-(k-1), x+(k-1)+1)]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
K,X = map(int,input().split()) 
min = X - K + 1
max = X + K - 1
a = np.arange(min,max+1)
print(*a)

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

Submission status: Accepted

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

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

seq = [i for i in seq if -1000000 <= i <= 1000000]

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

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-1):
        print(i," ",  end = "")
    print(i+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

min_x = x - k + 1
if(min_x < -1000000):
	min_x = -1000000

max_x = x + k - 1
if(max_x > 1000000):
	max_x = 1000000

for i in range(min_x,max_x+1):
	sys.stdout.write(str(i))
	if i != max_x:
		sys.stdout.write(" ")

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
conLis = []
B = []
for i in range(A[0]):
  conLis.append(i)

for i in conLis:
  if i == 0:
  	B.append(A[1])
  else:
    B.append(A[1]-i)
    B.append(A[1]+i)
B.sort()
for i in B:
  print(i, end = " ")

Submission status: Accepted

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

li = range(X-K+1, X+K)
print(*li)

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#m=int(input())
#r=[int(input()) for _ in range(n)]
#o=list(map(int,input().split()))
#b=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#a=[list(map(int,input().split()))for _ in range(n)]
#a=list(input().split("+"))
#m=[list(input().split())for _ in range(n)]
ans=[]
for i in range(x-(k-1),x+k):
    ans.append(i)
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kx=list(map(int,input().split()))
10**6
i=kx[0]
if kx[1]+i-1<10**6 and  kx[1]-i+1>-10**6:
    lst=list(range(kx[1]-i+1,kx[1]+i))
elif kx[1]+i-1>10**6:
    lst=list(range(kx[1]-i+1,10**6+1))
else:
    lst=list(range(-10**6,kx[1]+i))
print(' '.join(map(str, lst)))

Submission status: Accepted

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

if x + k - 1 > 1000000:
	dst = list(range(x-k+1,1000001))
elif x - k + 1 < -1000000:
	dst = list(range(-1000000,x+k))
else:
	dst = list(range(x-k+1,x+k))

print(' '.join(list(map(str,dst))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    
    print(*range(x - k + 1, x + k))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=""
for item in List:
	ans += str(item) + " "

print(ans)

Submission status: Accepted

Solution code:
K, X = map(int, 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 numpy as np
K, X = list(map(int,input().split()))
output = np.array(range(X-K+1,X+K))
output = output[(-1000000<=output)&(output<=1000000)]
print(' '.join(map(str, output)))

Submission status: Accepted

Solution code:
import numpy as np

a,b = map(int, input().split())

ans = np.array(range(b - (a - 1), b + (a)))

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

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
#print(x[1]-x[0])
for i in range(x[1]-x[0]+1,x[1]+x[0]):
  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(" ".join(map(str,ans)))

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
a,b = max(-1000000,X-K+1),min(1000000,X+K-1)
s=""
for i in range(b-a+1):
    s += str(a+i)+" "
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

max_Lange = X+K-1
min_Lange = X-K+1

list_aaa = []

for i in range(min_Lange,max_Lange+1):
    list_aaa.append(i)

print( *list_aaa )

Submission status: Accepted

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

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:
import sys
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

lim_left = -1000000
lim_right = -lim_left

start = max(x - k + 1, lim_left)
for i in range(start, x + k):
    if i < lim_right:
        print(i, end=' ')

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a = []
    k, x = list(map(int, input().rstrip('\n').split()))
    for i in range(x, x - k, -1):
        if i not in a:
            a.append(i)
    for i in range(x, x + k):
        if i not in a:
            a.append(i)
    print(*sorted(a))


if __name__ == '__main__':
    slove()