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

Submission status: Accepted

Solution code:
K, X = list(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())
l = []
a = ""
for i in range(x-k+1,x+k):
    if -1000000 <= i <=100000:
        l.append(i)

l = [str(j) for j in l]
print(" ".join(l))

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

begin = x - k + 1
end = x + k - 1
if begin < -1000000:
    begin = -1000000
if end > 1000000:
    end = 1000000

print(" ".join(str(i) for i in range(begin, end + 1)))

Submission status: Accepted

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

if x-k+1<=-1000000:
  a=-1000000
else: a=x-k+1
if x+k-1>=1000000:
  b=1000000
else:b=x+k-1

print(*range(a,b+1))

Submission status: Accepted

Solution code:

K,X=map(int,input().split())
lis=[]
st=""
lis=list(range(X-K+1,X+K,1))


for i in range(len(lis)):
    st="".join((st," ",str(lis[i])))
st=st.strip()
print(st)

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

li = []

for i in range (2*K-1):
	li.append (X-K+i+1)

print (*li)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print(*li)

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

Submission status: Accepted

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

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

print()

Submission status: Accepted

Solution code:
def LI():
  return [int(s) for s in input().split()]

K,X = LI()

# Xまで

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

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

Submission status: Accepted

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

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

print(A)

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
kx = list(map(int, input().split()))
k, x = kx[0], kx[1]
minimum = x - k + 1
maximum = x + k - 1
minimum = max(minimum, -1000000)
maximum = min(maximum, 1000000)
r = [i for i in range(minimum, maximum + 1)]
print(" ".join(list(map(str, r))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

row = []

for i in range(left, right +1):
    row.append(str(i))
print(" ".join(row))

Submission status: Accepted

Solution code:
#player1:1
#player2:2
#blank:0
k, m =map(int, input().split())
n = k - 1
answer = [m]
for i in range(1, n + 1):
    answer.append(m - i)
    answer.append(m + i)
answer.sort()
if k == 1:
    answer = [m]
print(*answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = ""
for i in range(x-(k-1), x+(k-1)+1):
  if i >= -1000000 and i <= 1000000:
    ans = ans + str(i) + " "
  
print(ans.strip())

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
num = X - K + 1
ans = []
while num < (X + K):
    ans.append(str(num))
    num += 1

print(' '.join(ans))

Submission status: Accepted

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

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

print(' '.join(ans))

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
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

K,X=LI()

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 11, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, read().split())

l, r = B - (A - 1), B + (A - 1)
ans = [str(i) for i in range(l, r + 1)]
print(' '.join(ans))

Submission status: Accepted

Solution code:
inputA,inputB =map(int, input().split(' '))

#inputA = 1
#inputB = 100

if inputA == 1:
    print(inputB)
else:
    for count in reversed(range(0,inputA,1)):
        print(inputB-count)
    for count in range(1,inputA,1):
        print(inputB+count)

Submission status: Accepted

Solution code:
import numpy as np

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

l = np.zeros(2*K-1)

for i in range(2*K-1):
    l[i] = X - (K-1-i)

for i in l:
    print(int(i), end=' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Min = X - K + 1
Max = X + K - 1

ans = list(range(Min, Max+1))

for i in ans:
	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 += str(i)+' '
print(ans[:-1])

Submission status: Accepted

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

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

print()

Submission status: Accepted

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

Submission status: Accepted

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


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(str(i))
print(' '.join(S))

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:
#python3
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())

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    k,x = LI()

    return JA(range(x-k+1,x+k), " ")


print(main())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = X - K +1
b = X + K
ans = []

for i in range(a, b):
    ans.append(i)
print(*ans)

Submission status: Accepted

Solution code:
def fa(K,X):
    ch=""
    L=[X]
    for i in range(1,K):
        L.append(X-i)
        L.append(X+i)
    L.sort()
    C=str(L)
    ch=C[1:len(C)-1]
    return ch
K,X=map(int,input().split())
print(fa(K,X).replace(",",""))

Submission status: Accepted

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

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

print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

K -= 1 
if  -1000000 <= X-K:
	start = X-K 
else:
	start = -1000000

if X+K <= 1000000:
	goal = X+K
else:
	goal = 1000000


ans = list(range(start,goal+1,1))
print(' '.join(map(str,ans)))

Submission status: Accepted

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

L = X - (K-1)
R = X + (K-1)

if L < -1000000:
    L = -1000000

if R > 1000000:
    R = 1000000

for x in range(L,R+1):
    print(x, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K, X = map(int, input().split())
    for i in range((X-K+1), (X+K)):
        if (i>=((-1)*1000000)) & (i<=1000000):
            print(i, end=" ")
    return 0

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

#print(_range)

ans = " ".join([str(n) for n in _range])

print(ans)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
ans = ' '.join(map(str,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(str(i))
print(' '.join(ans))

Submission status: Accepted

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

min_ = max(-a, X - (K - 1))
max_ = min(a, X + (K - 1))

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

Submission status: Accepted

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

ans = list(range(x - k + 1, x + k))

print(*ans)

Submission status: Accepted

Solution code:
# One Clue

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

# solve
s = max(-1000000, X - K)
e = min( 1000000, X + K)
res = ' '.join([str(e) for e in range(s+1, e)])

# output
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 1

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


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

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



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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
S = X -(K-1)
while True:
    if S > X + (K -1):
        break
    print(str(S)+" ", end="")
    S += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = list(map(int, input().split()))
if n==1:
  print(m)
else:
  ans = [m]
  for i in range(n-1):
    ans.append(m-(n-i)+1)
    ans.append(m+i+1)
  ans.sort()
  print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

tmp = X + K
tmp2 = X - K + 1

ans = np.arange(tmp2, tmp)
for i, v in enumerate(ans):
    print(' {}'.format(v), end='') if i > 0 else print('{}'.format(v), end='')
print('')

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A = []
for i in range(k-2, -1, -1):
    A.append(x-i-1)
for i in range(k):
    A.append(x+i)
s = ""
for i in A:
    s += str(i) + " "
print(s[:-1])

Submission status: Accepted

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

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

lst2 = sorted(list(set(lst1)))

print(' '.join([str(_) for _ in lst2]))

Submission status: Accepted

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

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

Submission status: Accepted

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

if m < -1000000:
  m = -1000000
if M > 1000001:
  M = 1000001

print(' '.join(str(i) for i in range(m, M)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    k,x=map(int,input().split())
    print(*range(x-k+1,x+k))
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

if min < -1000000:
  for i in range(-1000000, max+1):
    ans.append(i)
elif max > 1000000:
  for i in ragne(min, 1000001):
    ans.append(i)
else:
  for i in range(min, max+1):
    ans.append(i)

print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cand = [X]
for i in range(1, K):
    if X+i <= 1000000:
        cand.append(X+i)
    if X-i >= -1000000:
        cand.append(X-i)
cand.sort()
print(*cand)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
list = []
for i in range(0, k):
    list.append(x-i)
for j in range(0, k):
    list.append(x+j)
list.sort()
list.remove(x)
#print(list)
print(' '.join(map(str,list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

print(*[i for i in range(X - K + 1, X + K) if (i > -1000000 and i < 1000000)])

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    k, x = map(int, input().split())
    ans = [x]
    for i in range(1, k):
        ans.append(x+i)
        ans.append(x-i)
    ans = filter(lambda x: -1000000 <= x <= 1000000, ans)
    print(*sorted(ans))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = [X]; tmp1 = X; tmp2 = X
for i in range(K-1):
    ans.append(tmp1+1)
    tmp1 += 1
    ans.append(tmp2-1)
    tmp2 -= 1
    
print(' '.join([str(num) for num in sorted(ans)]))

Submission status: Accepted

Solution code:
import sys

num = list(map(int,input().split()))
K = num[0]
X = num[1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
(A, B), = [list(map(int, s.split())) for s in open(0)]
nums = []
for i in range(B - A + 1, B + A):
    if (i >= - 1e6) and (i <= 1e6):
        nums.append(i)
print(*nums)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = []
tmp = []
A,B = map(int,input().split())
b = B-(A-1)
for i in range(A*2-1):
  if A == 1:
    a.append(B) 
  else:
    a.append(b+i)
while a:
  e = a.pop()
  if e <= 10000000 and e>=-10000000:
    tmp.append(e)
tmp = sorted(tmp)
tmp = [str(n) for n in tmp]
p =' '.join(tmp)
print(p)

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 = []

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
a=list()
for i in range(k):
    if i==0:
        a.append(x)
        continue
    a.append(x+i)
    a.append(x-i)
b=sorted(a)
print(*b)

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

Submission status: Accepted

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

Submission status: Accepted

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

a_=[]
for i in range(1,2*k):
    result=x-k+i
    if result<-1000000 or 1000000<result:
        continue
    else:
        a_.append(x-k+i)

print(*a_)

Submission status: Accepted

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

Submission status: Accepted

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

	mae = x-k+1
	ato = x+k-1

	if mae <= -1000000:
		mae = -1000000
	if ato >= 1000000:
		ato = 1000000
	print(' '.join(map(str,list(range(mae,ato+1)))))

if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
A=[]
if X-K+1 < -1000000:
  B= range(-1000000, X+K)
  for i in B:
    A.append(i)
elif 1000000 < X-K+1:
  C= range(X-K+1,1000001)
  for i in C:
    A.append(i)
else:
  D=range(X-K+1,X+K)
  for i in D:
    A.append(i)
print(*A)

Submission status: Accepted

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

s = max(-1000000, X - K + 1)
e = min(1000000, X + K - 1)

ans = list(map(str, [i for i in range(s, e+1)]))

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

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:
#22:27
k,x = map(int,input().split())

x_min = -1000000
x_max = 1000000

a_min = x - k + 1
a_max = x + k - 1
if a_min < x_min:
    a_min = x_min
    a_max = x_min + k - 1
if a_max > x_max:
    a_max = x_max
    a_min = x_max - k + 1
ans = str(a_min)
t = 0
while(t != (a_max - a_min)):
    t += 1
    ans += " " + str(a_min+t)

print(ans)

Submission status: Accepted

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

min_nm = b-a+1
max_nm = b+a

l = np.arange(min_nm,max_nm,1).tolist()
ans = map(str,l)
print(' '.join(ans))

Submission status: Accepted

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

wrk_min = x + 1 - k 
wrk_max = x - 1 + k 

for i in range(wrk_min,wrk_max + 1):
    if (i >= -1000000) or (i <= 1000000):
        print(i,end=' ')

Submission status: Accepted

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

min_n = X - (K - 1)
max_n = (K - 1) + X


L = " ".join(list(map(str, range(min_n , max_n + 1))))
print(L)

Submission status: Accepted

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

Min = x-k+1
Max = x+k

List = [str(i) for i in range(Min, Max)]

print(*List)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list = input().split()
k = int(list[0])
x = int(list[1])
min_num = x-k+1
max_num = x+k-1
ans_list = [num for num in range(min_num, max_num+1)]
ans = [ans_list]
print(*ans[0])

Submission status: Accepted

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

answer = ''
for i in range(X-(K-1),X+K,1):
  if i != X-(K-1):
    answer = answer + ' ' + str(i)
  else:
    answer = str(i)
else:
  print(answer)

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

print(' '.join(list(map(str,list(range(max(-10**5,X-K+1), min(X+K,10**5+1)))))))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

_MIN = -1000000
_MAX = 1000000

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


candidate_min = max(X - K + 1, _MIN)
candidate_max = min(X + K - 1, _MAX)

print(" ".join(map(str, range(candidate_min, candidate_max + 1))))

Submission status: Accepted

Solution code:
while True:
    L=lambda:list(map(int,input().split()))
    k,x=L()
    if x>=0 and x<=100 and k>=1 and k<=100:
        break
c =[]
for i in range(x-k+1,x+k,1):
    c.append(i)
c = [str(int) for int in c]
print(' '.join(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

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

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

Submission status: Accepted

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

a = [0] * (K*2 -1)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

base=[]

if X<=-1000000+K:
    for i in range(K):
        base.append(-1000000+K)
        if X+i>-1000000+K:
            base.append(X+i)
    answer=sorted(base)
else:
    for j in range(K):
        base.append(X-j)
        if j>=1:
            base.append(X+j)
    answer=sorted(base)

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

Submission status: Accepted

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

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