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())
if k==1:
    print(x)
    exit()
a=x+1-k
s=""
for i in range(k*2-1):
    s+=str(a) + " "
    a+=1
print(s.strip())

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:
k,x = map(int,input().split())
s_min = x-k+1
s_max = x+k
ans_list = [i for i in range(s_min, s_max)]
print(*ans_list)

Submission status: Accepted

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

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

coordination = list(map(str,list(range(min,max))))
ans = ' '.join(coordination)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# abc137 B
kx = list(map(int,input().split()))
k = kx[0]
x = kx[1]

lower_lim = x - k + 1
upper_lim = x + k - 1

ans = list(range(int(lower_lim), int(upper_lim+1)))
print(*ans)

Submission status: Accepted

Solution code:
K, N = map(int, input().split())
L = [v for v in range(N - K + 1, N, 1)]
R = [v for v in range(N, N+K, 1)]
L.extend(R)
set(L)
LLL = sorted(list(L))
print(" ".join(list(map(str, LLL))))

Submission status: Accepted

Solution code:
L=[]
K,X=map(int,input().split())
if X-(K-1)<=-1000000:
  S=-1000000
  for i in range(S,S+(K*2-1)):
    L.append(str(i))
  print(" ".join(map(str,L)))
elif X+(K-1)>=1000000:
  E=1000000
  for i in range(E,E-(K*2-1),-1):
    L.append(str(i))
  print(" ".join(map(str,L)))
else:
  S=X-(K-1)
  for i in range(S,S+(K*2-1)):
    L.append(str(i))
  print(" ".join(map(str,L)))

Submission status: Accepted

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

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

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

print("")

Submission status: Accepted

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

Submission status: Accepted

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

z = [int(x)]
for i in range(1,int(k)):
  small = int(x) - i
  large = int(x) + i
  z.append(small)
  z.append(large)
  
ans = sorted(z)
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = list(map(int, input().split()))
end_l = max(-1000000, X - K + 1)
end_r = min(1000000, X + K - 1)
ans = ""
for i in range(end_l, end_r):
    ans += str(i)
    ans += " "
ans += str(end_r)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

result = range(X - K + 1, X + K)

print(*result)

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=" ")
#print(x+k-1)

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())
ans=""
for i in range(1,2*k):
    if -1000001<x-k+i<10000001:
        ans += str(x-k+i)+" " 
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    k = i[0]
    x = i[1]

    if not(1 <= k and k <= 100 and 0 <= x and x <= 100):
        return

    min = x - k + 1
    max = x + k - 1

    for j in range(max - min + 1):
        print(j + min)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    k, x = map(int, input().split())
    for i in range(x - k+1, x + k):
        print(i, end=' ')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

ans = ''
for i in range(start,end+1):
    ans += '{} '.format(i)
ans = ans[:-1]

print(ans)

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
Mx = min (X + K - 1,1000000)
Mn = max (X - K + 1,-1000000)
Ans = ''
for i in range(Mn,Mx+1,1):
  Ans += str(i)+" "
print(Ans)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
a = []
if x-k+1<-1000000:
  i = -1000000
else:
  i = x-k+1
while i<=x+k-1:
  a.append(i)
  if i >= 1000000:
    break
  i += 1
print(*a)

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
below = max([-1000000, x-(k-1)])
upper = min(1000001, x+k)
r= range(below,upper,1)

for i in r:
  print(i, end=' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
d=[i for i in range(k-n+1,k+n)]
s=[]
for i in range(len(d)):
  if -1000000<d[i]<1000000:
    s.append(d[i])
print(*s)

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

Submission status: Accepted

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

Submission status: Accepted

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

a=[]
for i in range(x-K,x+K+1):
    a.append(i)
print(*a)

Submission status: Accepted

Solution code:
# ABC 137: B – One Clue
k, x = [int(s) for s in input().split()]
coodinations_black = ''

for i in range(x - k + 1, x + k):
    coodinations_black += str(i) + ' '

print(coodinations_black[:-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,input().split())
for i in range(x-k+1,x+k):
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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())
ans = [str(i) for i in range(X-K+1, X+K)]
print((' ').join(ans))

Submission status: Accepted

Solution code:
#%%
import sys
def input():
    return sys.stdin.readline().rstrip()

def main():
    K, X = map(int, input().split())

    XL=max(X-K+1, -1000000)
    XR=min(X+K-1, 1000000)
    for i in range(XL, XR+1):
        print(i, end=" ")

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc137","b",main)

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())
A=[]
for i in range(X-K+1,X+K):
  A+=[i]
print(*A)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ko,x=map(int,input().split())
s=max(x-ko+1,-1000000)
print(*list(range(x-ko+1,x+ko)),sep=" ")

Submission status: Accepted

Solution code:
ko,x=map(int,input().split())
s=max(x-ko+1,-1000000)
print(*[s for s in range(x-ko+1,x+ko)],sep=" ")

Submission status: Accepted

Solution code:
ko,x=map(int,input().split())
s=max(x-ko+1,-1000000)
while True:
  print(s,end=" ")
  s+=1
  if s>min(ko+x-1,1000000):break

Submission status: Accepted

Solution code:
# 2019-11-16 14:51:41(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    k, x = [int(x) for x in sys.stdin.readline().split()]
    stones = range(-10**6, 10**6+1)
    x_place = bi_l(stones, x)
    ans = stones[x_place-(k-1):x_place+(k-1)+1]
    for c in ans:
        print(c, end=' ')
    # k, x の制約から端を気にする必要はない
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

k = ab[0]
x = ab[1]

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

print(" ".join(ans))

Submission status: Accepted

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

ans = 0

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

ans_array = [str(num) for num in range(start, end+1)]

print(' '.join(ans_array))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

[K,X] = inpl()
print(*list(range((X-K+1),(X+K))))

Submission status: Accepted

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

coordinate = str(X - K + 1)

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve():
    _min_tmp = (x - k + 1)
    _max_tmp = (x + k - 1)
    _min = max(-1000000, _min_tmp)
    _max = min(1000000, _max_tmp)

    ans = list(map(str, range(_min, _max + 1)))

    return ' '.join(ans)


print(solve())

Submission status: Accepted

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


def solve():
    _min = -1000000
    _max = 1000000

    if (x - k + 1) > _min:
        _min = x - k + 1
    if (x + k - 1) < _max:
        _max = x + k - 1

    ans = list(map(str, range(_min, _max + 1)))

    return ' '.join(ans)


print(solve())

Submission status: Accepted

Solution code:
import numpy as np
K,X=map(int,input().split(' '))
res=list(map(str,list(np.array(range(2*K-1))+X-K+1)))
print(' '.join(res))

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    K, X = map(int, input().split())
    ans = []
    for i in range(X, X + K):
        ans.append(i)

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

    print(*sorted(ans))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
limit=1000000
n,a=map(int,input().split())
res=[a-n+1+i for i in range(n*2-1)]
print(*res)

Submission status: Accepted

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

Submission status: Accepted

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

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())
res = range(x - k + 1, x + k)
print(*res)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(K, X):
    """Test Case
    >>> print_ans(3, 7)
    5 6 7 8 9
    >>> print_ans(4, 0)
    -3 -2 -1 0 1 2 3
    >>> print_ans(1, 100)
    100
    """
    ans = [i for i in range(X - K + 1, X + K)]
    print(" ".join(list(map(str,ans))))
if __name__ == '__main__':
    K, X = map(int,input().rstrip().split())
    print_ans(K, X)

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

Submission status: Accepted

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

k, x = mi()

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

print(*ans)

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 = []
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())
print(*range(max(-1000000, X-K+1), min(1000000, X+K)))

Submission status: Accepted

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

K, X = map(int, input().split())
min_X = X - K + 1
max_X = X + K - 1

print(*[i for i in range(min_X, max_X+1)])

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(max(left,-10000000),min(right+1,1000000)):
  print(i,end=" ")

Submission status: Accepted

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

if K == 1:
    print(X)
else:
    answer_list = []
    for i in range((X - (K - 1)), (X + K)):
        answer_list.append(i)
    print(*answer_list)

Submission status: Accepted

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

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

    # calc
    first = x - (k - 1)
    last = x + (k - 1)
    while first < last:
        print(first, end=' ')
        first += 1
    print(first)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in xl:
    print(i,end = ' ')

Submission status: Accepted

Solution code:
K,X=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:
K,X=map(int,input().split())
for i in range(-K+1,K):
  kuro = X+i
  if kuro >= -1000000 and kuro <= 1000000:
     print(kuro)

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = [str(i) for i in range(start, end + 1)]

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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):
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
ans = []
t_k = k
t_x = x
while t_k >= 1:
  if t_x not in ans:
  	ans.append(t_x)
  t_x -= 1
  t_k -= 1
  
t_k = k
t_x = x

while t_k >= 1:
  if t_x not in ans:
  	ans.append(t_x)
  t_x += 1
  t_k -= 1
  
ans.sort()
for a in ans:
  print(a, 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())

minimum = max(x - k + 1, -1000000)
maximum = min(x + k - 1, 1000000)

for i in range(minimum, maximum):
    print(i, end="")
    print(" ", end="")
print(maximum)

Submission status: Accepted

Solution code:
import bisect
k, x = map(int, input().split())
stone = [i for i in range(-1000000, 1000001)]
out = map(str, stone[bisect.bisect_left(stone, x - (k - 1)) : bisect.bisect_right(stone, x + (k - 1))])
print(' '.join(out))

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:
K, X = map(int, input().split())
import numpy as np
lis = []
for i in range(X-K+1, X+K):
  lis.append(i)
print(*lis)

Submission status: Accepted

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

start = b-a+1
loop = (a*2) -1

for i in range(loop):
    print(start + i ,end=" ")

Submission status: Accepted

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

def main():
    K,X = map(int, input().split())
    may_kuro_ishi = []
    for i in range(1,K+1):
        may_kuro_ishi.append(X - (K - i))
    for i in range(1,K):
        may_kuro_ishi.append(X+i)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
# 求める座標の数式は x - k + 1 <= 範囲 <= x + k - 1を満たす。
minP = x - k + 1
maxP = x + k - 1
numlist = list(range(minP, maxP + 1))
strlist = [str(letter) for letter in numlist]
print(" ".join(strlist))

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
left  = max(-10**6,X-K+1)
right = min(10**6,K+X-1)
ans = " ".join([str(i) for i in range(left,right+1)])
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
min_x = x - k + 1
max_x = x + k
for i in range(min_x, max_x):
  if i < -1000000 or i > 1000000:
    continue
  print(i, end=' ')

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, 1)
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, end = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = 2000001
k, x = map(int, input().split())
p = [i for i in range(-1000000, 1000001)]
filt = list(filter(lambda j: j >= x - (k-1) and j <= x + (k-1), p))
ans = ' '.join(list(map(str, filt)))
print(ans)

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:
KX=input().split()
K,X=int(KX[0]),int(KX[1])
 
lis = list(range(X-K+1,X+K))
print(*lis)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

xmin = max(-1000000, X-K+1)
xmax = min(1000000, K+X-1)

print(*[i for i in range(xmin,xmax+1)])

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())
edge = 10**6
left = max( x-k+1, -edge )
right = min( x+k-1, edge )
res = [ i for i in range(left, right+1) ]
print(*res)

Submission status: Accepted

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

start = x-(k-1)

ans = []
for i in range(k*2-1):
    tmp = start + i
    if tmp < -1000000:
        continue
    if tmp > 1000000:
        break
    ans.append(start + i)

print(*ans, sep=" ")

Submission status: Accepted

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

Submission status: Accepted

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

MIN=max(-1000000,X-(K-1))
MAX=min(1000000,X+(K-1))

L=[str(i) for i in range(MIN,MAX+1)]
L=" ".join(L)

print(L)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

rlist=list(range(X-K+1,X+K))
rlist_str=map(str,rlist)
print(" ".join(rlist_str))

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())
a = [0]*(2*k-1)
c = x-k+1
for i in range(len(a)):
    a[i] = str(c)
    c += 1
a = " ".join(a)
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

res_list = [X]


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

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

Submission status: Accepted

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

Submission status: Accepted

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

    start = x-(k-1)
    end = x+(k-1)
    array = [str(start+i) for i in range(end-start+1)]
    print(' '.join(array))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

list = [x]
a = 1

for X in range(n - 1):
  list.append(x + a)
  list.insert(0, (x - a))
  a += 1
str_list = str(list)
strip_list = str_list.strip("[]")
l = strip_list.replace(",", "")
print(l)

Submission status: Accepted

Solution code:
def t(k, x):
    return ' '.join(map(str, range(x - k + 1, x + k)))


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, exit

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

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

Submission status: Accepted

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

p = X-K+1
for _ in range(2*K-1):
    print(p,end=' ')
    p += 1
print()

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
min = X-(K-1)
max = X+(K-1)
if min < -1000000:
  min = -1000000
if max > 1000000:
  max = 1000000
li = []
  
for i in range(min,max+1,1):
  li.append(str(i))

print(' '.join(li))

Submission status: Accepted

Solution code:
if __name__ == '__main__':

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

	start = X - ( K - 1 )
	end   = X + ( K - 1 )

	print(*(list(i for i in range(start,end+1))))

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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