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())
pos = [x]

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

pos.sort()

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

Submission status: Accepted

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

d = X + 1000000
l = max(d - K + 1, 0)
r = min(d + K - 1, 1000000 * 2)
print(*[i for i in range(l - 1000000, r + 1- 1000000)])

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = list(range(left, right+1))

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

Submission status: Accepted

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

Submission status: Accepted

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

K = parents[0]
X = parents[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k-=1

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

print(' '.join(line))

Submission status: Accepted

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

    answer = []
    for i in range(max(-1000000, x-k+1), min(1000000, x+k-1)+1):
        answer.append(str(i))

    print(" ".join(answer))

Submission status: Accepted

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

x_min = X - K + 1
x_max = X + K - 1

if x_min < -1000000:
    x_min = -1000000

if x_max > 1000000:
    x_max = 1000000


result = []
for i in range(x_min, x_max+1):
    result.append(str(i))

print(' '.join(result))

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:
B = 1000000
K,X = map(int,input().split())
up = min(X+K,B+1)
down = max(X-(K-1),-B)

for i in range(down,up):
  print(i,end=" ")

Submission status: Accepted

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

s= ""
for i in range(max(-100000,k-n+1), min(100000,k+n-1)+1):
  if i != max(-100000,k-n+1):
    s += " "
  s += str(i)
  
print(s)

Submission status: Accepted

Solution code:
# coding: utf-8


def main():
    k, x = map(int, input().split(" "))
    saidai = x + k-1
    saishou = x - k + 1
    r = ""
    for i in range(saishou, saidai+1):
        r = r + str(i) + " "
    print(r[0:-1])

main()

Submission status: Accepted

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

print(' '.join(map(str,filter(lambda y: y >= -1000000 and y <= 1000000,range(x - k + 1, x + k)))))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
# print(X, K)
l = X - K + 1
r = X + K - 1
ans = ''
for i in range(2 * K - 1):
    ans += str(l + i)
    if i != 2 * K - 1:
        ans += ' '
print(ans)

Submission status: Accepted

Solution code:
K, X = [int(kx) for kx in input().split()]
A = range(X-K+1, X+K)
ANS = []
for a in A:
  if -1000000 <= a <= 1000000:
    ANS.append(str(a))
ans = " ".join(ANS)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def A():
    a, b = map(int, input().split())
    lt = [
        a + b,
        a - b,
        a * b
    ]
    print(max(lt))


def B():
    k, x = map(int, input().split())
    
    answer = ''
    for i in range(2*k-1):
        answer += str(x-k+1+i) + ' '
    
    answer = answer[:-1]
    print(answer)
    

if __name__ == '__main__':
    B()

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())
b = x - k + 1
n = 2 * k - 1
print(' '.join([str(b + i) for i in range(n)]))

Submission status: Accepted

Solution code:
#! python

K, X = [int(x) for x in input().split()]
MIN = -1000000
MAX = 1000000

start = max(MIN, X-K+1)
end = min(MAX, X+K-1)
print(" ".join(map(str,list(range(start, end+1)))))

Submission status: Accepted

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

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

m = max(X-K+1,-1000000)
M = min(X+K-1,1000000)
ans = []
while m <= M:
    ans.append(str(m))
    m += 1

print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math

def main():
    K,X = map(int, sys.stdin.readline().split())

    ans = [x for x in range(X-K+1,X+K-1+1)]
    print(*ans)

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[K,X]=[int(i) for i in input().split()]
mi=max(-1000000,X-K+1)
ma=min(1000000,K+X-1)
for i in range(mi,ma+1):
	print(i,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

ans2 = list(range(X-(K-1), X+K))
ans = []

for a in ans2:
    if -1000000 <= a <= 1000000:
        ans.append(str(a))

print(' '.join(ans))

Submission status: Accepted

Solution code:
from sys import stdin
K,X = [int(x) for x in stdin.readline().rstrip().split()]
for i in range(X-K+1,X+K):
    #if i in list(range(0,100)):
    print(i,end=" ")

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

Submission status: Accepted

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

print(*[i for i in range(x-k+1, x+k)])

Submission status: Accepted

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

first=x-k+1
last=x+k-1
numlist=[]

if first>=-1000000 and last<=1000000:
    for i in range(first,last+1):
        numlist.append(str(i))
elif last<=1000000:
    for i in range(-1000000,last+1):
        numlist.append(str(i))
elif first>=-1000000:
    for i in range(first,1000001):
        numlist.append(str(i))
else:
    for i in range(-1000000,1000001):
        numlist.append(str(i))
print(" ".join(numlist))

Submission status: Accepted

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


def solve(K: int, X: int):
    print(' '.join([str(i) for i in range(X-K+1, X+K)]))
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for a in sorted(ans):
    print(a,end=" ")
print()

Submission status: Accepted

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

M = 2*K-1

ansList = [X-K+1] * (M)

for i in range(M):
    ansList[i] += i

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

Submission status: Accepted

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

_black_list = []

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

print(' '.join([str(x) for x in _black_list]))

Submission status: Accepted

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

l = range(max(X-K+1, -1000000), min(X+K,1000000+1))

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

Submission status: Accepted

Solution code:
# 2019/08/10

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC 137, B -
k, x = [int(el) for el in input().split(' ')]

ans = list(range(x - (k-1), x + k))
print(' '.join([str(el) for el in ans]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K,X=list(map(int,input().split()))
m=max(-1000000,X-K+1)
M=min(1000000,X+K-1)
A=[]
for i in range(m,M+1):
    A.append(i)
print(' '.join(map(str,A)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

m = 1000000

k, x = [ int(x) for x in sys.stdin.readline().split() ]

i = max(-m,x-k+1)
j = min( m,x+k-1)
for i in range(i,j+1):
    if i<j: print( i,end=" ")
    else: print(i)

Submission status: Accepted

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

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

print(' '.join(map(str, range(start, stop))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from collections import defaultdict, deque
import math
from math import factorial
import fractions
import re
import bisect

BIGNUM = 10 ** 9 + 7

def main():
    K, X = map(int, input().split())
    #N = int(input())
    #Hs = list(map(int, input().split()))

    left = max([X-K+1, -2000000])
    right = min([X+K-1, 2000000])

    nums = list(range(left, right+1))

    print(" ".join(map(str, nums)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

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

print(" ".join(a))

Submission status: Accepted

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

Submission status: Accepted

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

ansli=[]
for i in range (x * 2 - 1):
    ans = y - x + i + 1
    if (ans <= 1000000 and ans >= -1000000):
        ansli.append(ans)

for i in range(len(ansli)):
    print(ansli[i], end = "")
    if i != len(ansli) -1:
        print(" ", end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

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


def solve(K: int, X: int):
    ans = [i for i in range(max(-1000000, X-K+1),min(X+K, 1000000))]
    print(*ans)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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())
s=[]
for i in range(x-k+1,x+k):
  s.append(i)
print(*s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
k, now = map(int,input().split())

start = now-k+1
end = now+k-1

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

Submission status: Accepted

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

Submission status: Accepted

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

nk=k-1
mn=x-nk
mx=x+nk+1
ls=[]
for i in range(mn,mx):
    ls.append(i)
    
def convert(list):
    res=" ".join(map(str, list))
    return res

print(convert(ls))

Submission status: Accepted

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

Submission status: Accepted

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

c = str(x-k+1)

for i in range(x-k+2,x+k) : #x-k+2 to x+k-1
    c += ' '+str(i)

print(c)

Submission status: Accepted

Solution code:
import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    k,x =map(int, sys.stdin.readline().split())
    l=[]
    for i in range(x-k+1,x+k):
        l.append(i)
    print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
#N = int(input())
K, X = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]

T = [str(i) for i in range(X - (K-1), X + K) if i >= -1000000 and i <= 10000000]
print(' '.join(T))


#sys.exit()

Submission status: Accepted

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


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

    for i in range(max(-10 ** 6, x - k + 1), min(10 ** 6 + 1, k + x)):
        ans.append(i)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
for _ in range(A[1] + 1 - A[0],A[1] + A[0]):
    if -1000000 <= _ and _ <= 1000000:
        print(_)

Submission status: Accepted

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

Submission status: Accepted

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

a=lis[1]-lis[0]+1
b=lis[0]*2-1
ans=[]

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

print(*ans)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
p = range(max(X - K + 1, -1000000), min(X + K, 1000001))
print(" ".join(map(str, p)))

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    K, X = MAP()
    minv = max(X - K + 1, -1000000)
    maxv = min(X + K - 1, 1000000)
    Y = list(range(minv, maxv+1))
    print(*Y)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

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

Submission status: Accepted

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

for i in lst:
    print(i,end=" ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
left = X - K + 1
right = X + K - 1
if left < -10**6:
    left = -10**6
if right > 10**6:
    right = 10**6

print(*list(range(left, right+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:
a, b = map(int, input().split())
ans = []
for i in range(b-a+1, b+a):
    ans.append(str(i))
print(" ".join(ans))

Submission status: Accepted

Solution code:
from sys import stdin

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

    min_ = max(X - K + 1, -1000000)
    max_ = min(X + K -1, 1000000)
    ans = [i for i in range(min_, max_ + 1)]
    print(*ans)

input = lambda: stdin.readline()
main()

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

k, x = readmi()

index = x - k + 1
s = defaultdict(int)
for i in range(k):
    for j in range(k):
        s[j + index] = 1
    index += 1
for i in sorted(s):
    print(i, end=" ")

Submission status: Accepted

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

ansLst.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
K,X = map(int,input().split(' '))

st = X-(K-1)
if st<-10**6:
    st = -10**6
las = X+(K-1)
if las>10**6:
    las = 10**6

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

print(" ".join(l))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
k, x =  list(map(int, input().split() ))
# 場合分け不要

a = range(x-k+1, x+k-1 + 1)
a = list(a)
a = map(str, a)
print(" ".join(a))
# for i in range(x-k+1, x+k-1 + 1):
# 	print(i)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
k,x = list(map(int,input().split()))
stones = 2000001
start = 1000000
end = 1000000
print(" ".join(list(map(str,[i for i in range(x-k+1,x+k)]))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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):
    if i >= -1000000 and i <= 1000000:
       print(str(i)+' ',end='')
print()

Submission status: Accepted

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

print(' '.join(map(str,sorted(set([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=' ')

Submission status: Accepted

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


up = X + K - 1
lw = X - K + 1

lst = []
for i in range(lw, up+ 1):
    lst.append(i)


print(*lst)

Submission status: Accepted

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

Submission status: Accepted

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

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

MIN = -1000000
MAX = 1000000

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

print(' '.join(map(str, list(range(m, M+1)))))

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(map(lambda p: int(p), input().split()))
ans = ''
s = x - k + 1
for i in range(2*k - 1):
    ans += str(s+i) + ' '
    
print(ans)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [K, X] = string_to_int(inputs[0])
    ret = []
    for i in range(X - K + 1, X + K):
        if i >= -1000000 and i <= 1000000:
            ret.append(i)
    return ret


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    s = ""
    for i in ret:
        s += "{} ".format(i)
    print(s.strip())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
for i in range((b-a)+1,(b+a)):
    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:
parts = input().split(' ')
k = int(parts[0])
x = int(parts[1])

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

print(' '.join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=[int(i) for i in input().split()]
for i in range(max(x-k+1,-1000000),min(1000000,x+k-1)+1):
    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-1:
        break
    print(" ", end="")
print()

Submission status: Accepted

Solution code:
def main():
    K,X = map(int,input().split())
    
    max = X + K - 1
    min = X - K + 1
    ans = []

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




if __name__ == '__main__' :
    main()

Submission status: Accepted

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

Submission status: Accepted

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