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:
import numpy as np

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

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

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

Submission status: Accepted

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

K = S[0]
X = S[1]


A = X-K+1
B = X+K

for i in range(A, B, 1):
  print(i, end="")
  print(" ", end="")

Submission status: Accepted

Solution code:
K, X = map(int,input().split())
ans = map(str, list(range(X-K+1,K+X)))
output = " ".join(ans)
print(output)

Submission status: Accepted

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

Submission status: Accepted

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

mini = x - k + 1
maxi = x + k

l = list(range(max([mini,-1000000]),min([1000000,maxi])))
if not l:
  print(x)
else:
  for a in range(len(l)):
    print(l[a],end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

if K==1:
  print(X)
  sys.exit()

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

Submission status: Accepted

Solution code:
k,x=map(int, input().split())
a=[x+i for i in range(-k+1,k)]
b=[]
for i in range(len(a)):
    if a[i]>=-(10**6) and a[i] <= 10**6:
        b.append(a[i])
print(" ".join(map(str, b)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = int(k)
x = int(x)

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

numbers = list(range(start, end+1))
strs = map(lambda v: str(v), numbers)

text = ' '.join(strs)

print(text)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    l = input().split()
    k, x = int(l[0]), int(l[1])
    min_x = x - (k - 1)
    max_x = x + (k - 1)
    all = list(range(min_x, max_x+1))
    asn = " ".join([str(s) for s in all])
    print(asn) 
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
s=[]
for n in range(1,K):
  a=X+n
  b=X-n
  s.append(a)
  s.append(b)
s.append(X)
s=sorted(s)
print(" ".join(map(str, s)))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = max(-10000,b-a+1)
y = min(10000,b+a-1)

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    k, x = [int(x) for x in stdin.readline().rstrip().split()]
    ans = [x]

    for i in range(1, k):
        ans.insert(0,x-i)
        ans.append(x+i)

    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def B_OneClue():
    K, X = map(int, input().split())
    point_min = max(X - K +1,  -1000000)
    point_max = min(X + K - 1, 1000000)
    for x in range(point_max - point_min + 1):
        print(x + point_min, end=" ")
    
if __name__ == "__main__":
    B_OneClue()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

list = []
if K != 1:
  for i in range(min, max + 1):
    list.append(i)
else:
  print(X)
for i in list:
  print(i)

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
l = X-(K-1) if X-(K-1)>=-1000000 else -1000000
r = X+(K-1) if X+(K-1)<=1000000 else 1000000
print(" ".join(map(str, range(l, r+1))))

Submission status: Accepted

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

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

Submission status: Accepted

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

if K == 1:
  print(X)
else:
  for i in range(X , X + K):
    arr.append(i)
    
  for j in range(X - K + 1 , X):
    arr.append(j)
    
arr.sort()
map_result = map(str, arr)
result = ' '.join(map_result)
print(result)

Submission status: Accepted

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

anslist = range(max(-1000000, x-k+1), min(1000001, x+k))
anslist = map(str, anslist)

print(" ".join(anslist))

Submission status: Accepted

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

min = b - (a - 1)
max = b + (a - 1)

output = ''
for i in range(min, (max+1)):
  hoge = str(i) + ' '
  output += hoge

output.rstrip()

print(output)

Submission status: Accepted

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

Submission status: Accepted

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

k,x = [int(i) for i in input().split(' ')]

output = ''
n_max = max(-100000, x - k + 1)
n_min = min(100000, x + k)

for i in range(n_max, n_min):
    output += str(i)
    output += ' '

if n_max == n_min:
    print(n_max)
else:
    print(output[:-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x =map(int,input().split())
min=x-k+1
max=x+k
ans=[None]*(2*k-1)
for i in range(min, max ,1):
  if i == max-1:
    print(i)
  else:
    print(i, end=" ")

Submission status: Accepted

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

ans = list()

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

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

r = ""
for item in sorted(set(ans)):
    r += str(item)+" "

print(r)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
c = [str(x)]
for y in range(k):
  if k == 1:
    break
  elif y == 0:
    continue
  else:
    if x+y < 1000000:
      c.append(str(x+y))
    if x-y > -1000000:
      c.insert(0,str(x-y))
print(' '.join(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
# coding: utf-8
# Your code here!

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

K = input[0]
X = input[1]


ans = []

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

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

Submission status: Accepted

Solution code:
inp = input().split(" ")
inp = list(map(int, inp))
K = inp[0]
X = inp[1]
r = list(range(X - K + 1, X + K))
print(*r)

Submission status: Accepted

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

P=X-K+1
Q=X+K
L=np.arange(P,Q)
print(*list(L))

Submission status: Accepted

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

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

list=[]
for i in range(min,max+1,1):
    list.append(i)

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
  [a,b] = map(lambda x:int(x),line.split(' '))
  print(' '.join(map(lambda x:str(x),range(b-a+1,b+a))))

Submission status: Accepted

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

l = [0]
ans = ''


for i in range(1, k):
    l.append(-i)
    l.append(i)
    
l.sort()

for j in range(len(l)):
    l[j] = l[j] + x
    
for m in l:
    ans += str(m)+' '
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
L = 2*K
cnt = X - K + 1
ans = ''
for i in range(L):
    if i < L-2:
        ans += str(cnt) + ' '
        cnt += 1
    elif i == L-1:
        ans += str(cnt)
print(ans)

Submission status: Accepted

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

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

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

print(' '.join(xs))

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:
def main(text):
    a = list(map(int, text.split()))
    b = []
    for i in range(a[1]-a[0]+1, a[1]+a[0]):
        b.append(i)
    print(" ".join(map(str, b)))


main(input())

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 = x - k + 1
b = x + k - 1

r = list(range(a, b+1))

if a == b:
    print(a)
else:
    print(' '.join(map(str, r)))

Submission status: Accepted

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

if(X-K+1 < -1000000):
    ans = range(-1000000, X+K)
elif(X+K-1 > 1000000):
    ans=range(X-K+1,1000000+1)
else:
    ans=range(X-K+1,X+K)

b = list(ans)
print(' '.join(map(str, b)))

Submission status: Accepted

Solution code:
import numpy as np

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

ans = np.arange(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(X-K+1+i, end=" ")

Submission status: Accepted

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


min_x = x - k + 1
max_x = x + k - 1

for i in range(min_x, max_x +1):
  print(i, end=" ")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

begin = x - k + 1
end   = x + k - 1

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

Submission status: Accepted

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


Ans=[]

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

print( " ".join( repr(e) for e in Ans ) )

Submission status: Accepted

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

for i in range(k):
  li.append(x-k+i+1)
  
for i in range(1,k):
  li.append(x+i)
  
for i in range(len(li)-1):
  print(li[i],end=" ")

if len(li) == 1:
  print(x)
else:
  print(li[i+1])

Submission status: Accepted

Solution code:
# One Clue
N, X = map(int,input().split())

ans_1 = X-N+1
ans_2 = X+N
ans_int = list(range(ans_1, ans_2, 1))

ans=[str(a) for a in ans_int]
ans=" ".join(ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 3.4.3

import re
from collections import deque
from functools import reduce
from itertools import permutations
from math import pi
from operator import itemgetter
from operator import mul
from operator import xor
from os import linesep
from queue import PriorityQueue
from sys import stdin


def rline() -> str:
    return stdin.readline().strip()


def rlines(hint: int = 1):
    ret = ['' for i in range(hint)]
    for i in range(hint):
        ret[i] = rline()
    return ret


def htokens(hint: int = 1):
    lns = rlines(hint)
    ret = list(map(lambda ln: ln.split(), lns))
    # if return value has one and only one element(list),
    if hint == 1:
        # then add an empty list.
        ret.append([])
    return ret


def vtokens(hint: int = 1):
    m, _ = htokens()
    wint = len(m)
    ret = [[None] * hint for i in range(wint)]
    for y in range(hint):
        if y != 0:
            m, _ = htokens()
        # convert horizontal to vertical
        x = 0
        for v in m:
            ret[x][y] = v
            x += 1
    # if return value has one and only one element(list),
    if wint == 1:
        # then add an empty list.
        ret.append([])
    return ret


def rint(radix: int = 10) -> int:
    return int(rline(), radix)


def hints(hint: int = 1, radix: int = 10):
    ret = htokens(hint)
    for i in range(len(ret)):
        ret[i] = list(map(lambda v: int(v, radix), ret[i]))
    return ret


def vints(hint: int = 1, radix: int = 10):
    ret = vtokens(hint)
    for i in range(len(ret)):
        ret[i] = list(map(lambda v: int(v, radix), ret[i]))
    return ret


def mat(hint: int, wint: int):
    return [[None]*wint for i in range(hint)]


def filllist(lst, value: int) -> None:
    # destructive.
    for i in range(len(lst)):
        lst[i] = value


def isprime(n: int) -> bool:
    if n <= 1:
        return False
    if n in (2, 3, 5):
        return True
    if n % 2 == 0:
        return False
    if n % 3 == 0:
        return False
    lst = int(n**0.5)
    f = 5
    while f <= lst:
        if n % f == 0:
            return False
        if n % (f + 2) == 0:
            return False
        f += 6
    return True


def strmat(matrix, lnsep: str = linesep, fieldsep: str = ' ') -> str:
    return lnsep.join(map(lambda row: fieldsep.join(map(str, row)), matrix))


def strbool(boolval: int) -> str:
    return ['No', 'Yes'][boolval]


def solve() -> None:
    # read here
    (k, x), _ = hints()

    # solve here
    arr = [i for i in range(x-k+1, x+k)]
    ans = [arr]

    # print here
    print(strmat(ans))


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

mi = X - K + 1
ma = mi + (K * 2 - 2)

mi = max(mi, -1000000)
ma = min(ma, 1000000)

print(' '.join(map(str, range(mi, ma + 1))))

Submission status: Accepted

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

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

L = [str(int(i)) for i in l]
print(' '.join(L))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

k, x = [int(ii) for ii in input().split()]

min_k = max(-1000000, x - (k - 1))
max_k = min(1000000, x + (k - 1))

s = ""
for ii in np.arange(min_k, max_k + 1):
    s += "{} ".format(ii)

print (s)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
 
min = B - A + 1
num = A*2-1

values = []
for i in range(num):
  values.append(min)
  min+=1

for value in values:
  print(str(value) + ' ', end="")

Submission status: Accepted

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

min_i = max([-1000000, x-k+1])
max_i = min([1000000, x+k-1])

print(" ".join(map(str, range(min_i, max_i + 1))))

Submission status: Accepted

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

Submission status: Accepted

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

result = np.arange(x-k+1,x+k,1,dtype = 'int')

for i in range(len(result)):
    print(result[i],end = " ")

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
min_ = max([-1000000, X - K + 1])
max_ = min([1000000, X + K - 1])
print(str(list(range(min_, max_ + 1)))[1:-1].replace(",", ""))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if start < -1000000:
    start = -1000000
if end > 1000000:
    end = 1000000

output = list(map(str,range(start,end + 1)))

print(' '.join(output))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = map(int, input().split())
a = []
for n in range(k):
  a.append(x+n)
  a.append(x-n)
a.pop(0)
c = sorted(a)
l = [str(b) for b in c]
m = ' '.join(l)
print(m)

Submission status: Accepted

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

for i in reversed(range(K)):
    X -= i
    sys.stdout.write(str(X))
    sys.stdout.write(' ')
    X += i

for i in range(1, K):
    X += i
    sys.stdout.write(str(X))
    sys.stdout.write(' ')
    X -= i

Submission status: Accepted

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

a=list(range(X-K+1,X+K,1))
for i in a:
    if i<-10**6 or i>10**6:
        a.remove(i)

a=map(str,a)

print(" ".join(a))

Submission status: Accepted

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

k = int(i[0])
x = int(i[1])

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

for num in range(min, max):
	print(num, end=" ")
print(max)

Submission status: Accepted

Solution code:
K,X = [int(s) for s in input().split(" ")]
num_min =  1000000*(-1)
num_max =  1000000

blk_min = max(num_min, X - (K-1))
blk_max = min(num_max, X + (K-1))
out = ""
for i in range(blk_min, blk_max+1):
    out=out+str(i)+" "
    
print(out[:-1])

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
minv = x - (k-1)
maxv = x + (k-1)
list01 = []
for i in range (minv, maxv+1):
  list01.append(i)
  
for i in range (0, len(list01)):
  print(list01[i])

Submission status: Accepted

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

x0 = X - K + 1
x1 = X + K
n = abs(x0 - x1)
l = []
for i in range(n):
    l.append(i + x0)

print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
lis = []
for i in range(k):
  lis.append(x+i)
  lis.append(x-i)
set_lis = set(lis)
for i in sorted(list(set_lis)):
  print(i,end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
mo=10**9+7
imp='IMPOSSIBLE'
alp=string.ascii_lowercase
num=enumerate(alp)
d=dict()
for i,j in num:
    d[j]=i

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

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:
# coding: utf-8
import sys

# import bisect
# import math
# import numpy as np
# from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    k, x = ip.IL()
    memo = []
    for i in range(x-k+1, x+k):
        memo.append(i)
    print(*memo)

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
k, x = map(int, input().split())

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

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

Submission status: Accepted

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

idx = 1
lists = [0]
for _ in range(2 * a - 1):
	lists.append(b - a + idx) 
	idx += 1
del lists[0]
maped_num = map(str, lists) 
print(' '.join(maped_num))

Submission status: Accepted

Solution code:
# -*- config: utg-8 -*-

i = list(map(int, input().split()))

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

num_list = list(range(x-k+1, x+k, 1))
new_list = [e for e in num_list if -1000000 <= e <= 1000000]
lite_new_list = map(str, new_list)

print(' '.join(lite_new_list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

li.sort()
for l in li:
    print(l, 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="")
  print(" ",end="")

Submission status: Accepted

Solution code:
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())
ans = ""
for i in range(x+1-k, x+k) :
	if (i>=-1000000 and i <= 1000000) : ans = ans + " " + str(i)
print(ans[1:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
start = -1000000
end = 1000000
min_ = start if X - K + 1 < start else X - K + 1
max_ = end if X + K - 1 > end else X + K - 1
print(" ".join(map(str, range(min_, max_ + 1))))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=map(int, input().split())
a = list()
 
b = x+k-1
c = x-k+1
 
for i in range(c,b+1):
  if  -1000000 <= i and i <= 1000000:
    a.append(i)
  
print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
lists = []
for i in range(li[0]*2-1):
    lists.append(li[1]-li[0]+i+1)
moji = ""
for s in range(len(lists)):
    moji += " "+str(lists[s])
print(moji)

Submission status: Accepted

Solution code:
K , X = (int(x) for x in input().split())
st = X - (K - 1)
sp = X + (K - 1)
A = []

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