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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

min_x = x - (k - 1)
min_x = -1000000 if min_x < -1000000 else min_x

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

xs = list(range(min_x, max_x + 1))
print(" ".join(map(str, xs)))

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

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

from itertools import accumulate
from bisect import bisect, bisect_left
from collections import Counter, deque
from functools import reduce
from itertools import accumulate
from operator import itemgetter, xor
from string import ascii_lowercase as abc

from sys import setrecursionlimit
setrecursionlimit(10**9)
 
import sys
#input = sys.stdin.readline
from collections import Counter
def inpl(): return list(map(int, input().split()))

K, X = inpl()
minimum = max(-1000000, X-K+1)
maximum = min(1000000, X+K-1)
size = maximum-minimum+1 
print(*[minimum + x for x in range(size)])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

s = input().split()
a=int(s[0])-1
b=int(s[1])
npdata = np.arange(b-a, b+a+1, 1)

for s in npdata:
  print(s, end=" ")
print()

Submission status: Accepted

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

k -= 1

l = max(-1000000,x-k)
r = min(1000000,x+k)

print(*list(range(l,r+1)))

Submission status: Accepted

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

Submission status: Accepted

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

l =[]

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


print(*l)

Submission status: Accepted

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

output_list = []

for i in range(1,k):
    output_list.append(x-(k-i))
output_list.append(x)
for i in range(1,k):
    output_list.append(x+i)
print(' '.join(map(str,output_list)))

Submission status: Accepted

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

row = input().split()
k = int(row[0])
x = int(row[1])

blacklist = list(range(x-k+1, x+k))
answer = " ".join(map(str, blacklist))

print(answer)

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 = input()
K = int(K_X.split()[0])
X = int(K_X.split()[1])

out = ''
for i in range(X-(K-1),X+(K-1)+1):
  out += '%s ' % str(i)
out.rstrip(' ')
print(out)

Submission status: Accepted

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

min_b = X - K + 1
max_b = X + K

print(*range(min_b, max_b))

Submission status: Accepted

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


mi = l - (num -1)
ma = l + (num-1)


ff = np.arange(mi, ma+1, 1)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lst = [int(i) for i in input().split()]

# lst[1]座標
left = lst[1]-(lst[0]-1)
right = lst[1]+(lst[0]-1)
ans = list(range(left,right+1))

ans_s = ans[0]
for i in range(1,len(ans)):
    ans_s = str(ans_s)+' '+str(ans[i])
    
if lst[0] == 1:
    print(lst[1])
else:
    print(ans_s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 座標Xは黒　K個の意思が連続で黒で塗られてる
K, X = list(map(int, input().split()))

l = [n for n in range(X, X + K)]
l += [n for n in range(X - (K-1), X+1)]

l = sorted(list(set(l)))

l = list(map(str, l))
print(" ".join(l))

Submission status: Accepted

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

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

min_x = max(x - k + 1, -1000000)

max_x = min(x + k - 1, 1000000)

ans = []
for i in range(min_x, max_x + 1):
    ans.append(str(i))

print(' '.join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

l = list(range(left, X))
r = list(range(X, right))

print(" ".join(map(str, l + r)))

Submission status: Accepted

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

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

# print(listA)

listB = [x for x in listA if x >= -1000000 and x<=1000000]


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

Submission status: Accepted

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

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

answer = answer1 + answer2
answer = ' '.join(answer)
print(answer)

Submission status: Accepted

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

for i in range(1,K):
    L.append(X - (K - i))
    L.append(X + (K - i))
L.append(X)
L.sort()
print(' '.join(map(str, L)))

Submission status: Accepted

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

Submission status: Accepted

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

ans_list = []
if (x - k) < -1000000:
    for i in range(-1000000, x + k):
        ans_list.append(str(i))
elif (x + k) > 1000000:
    for i in range(x - k + 1, 1000001):
        ans_list.append(str(i))
else:
    for i in range(x - k + 1, x + k):
        ans_list.append(str(i))
print(' '.join(ans_list))

Submission status: Accepted

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

sita = x - (k - 1);
ue = x + k - 1;

if sita < -1000000 :
	sita = -1000000;
if ue > 1000000 :
	ue = 1000000;
	

print(sita,end="");
for i in range(sita+1,ue+1) :
	print(" ",i,end="");

Submission status: Accepted

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

out = x - (k - 1)
for i in range((k-1)*2+1):
  if out >= -1000000 and out <= 1000000:
    print(out, end=' ')
  out += 1

Submission status: Accepted

Solution code:
data = [int(x) for x in input().split(" ")]

num_0 = int(data[0])
num_1 = int(data[1])
 
for x in range(-num_0+1,num_0):
    print(num_1+x,end=" ")
print("")

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

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

for ans in range(max(X-K+1, -1000000), min(X+K, 1000000)):
    print(ans)

Submission status: Accepted

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

if X-K+1 < -10000:
	l = [int(arr) for arr in range(-10000,X+K)]
elif X+K-1>10000:
	l = [int(arr) for arr in range(X-K+1,10001)]
else:
	l = [int(arr) for arr in range(X-K+1,X+K)]

print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = a[0]
x = a[1]

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

Submission status: Accepted

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

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

l = -1e6
r = 1e6

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

Submission status: Accepted

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

Submission status: Accepted

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

import numpy as np

tmp = []
for i in range(K[1]-K[0]+1, K[1]+K[0]):
    if abs(i) <= 1000000:
        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:
k,x=map(int,input().split())

s=[]
m=x-k+1

for i in range(0,2*k-1):
    s.append(str(m+i))

print(' '.join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

s = ""
for i in range(k*2-1):
  v = x + i - k +1
  s = s + str(v) + " "

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

syou=x-k+1
dai=x+k
if syou>=-1000000:
    if dai<=1000000:
        llist=list(range(syou,dai,1))
    else:
        llist=list(range(syou,1000000,1))
else:
    if dai<=1000000:
        llist=list(range(-1000000,dai,1))
    else:
        llist=list(range(-100000,1000000,1))
for n in range(len(llist)):
    llist[n]=str(llist[n])
print(' '.join(llist))

Submission status: Accepted

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

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

if min < -1000000:
  min = -1000000

if max > 1000000:
  max = 1000000

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

Submission status: Accepted

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

lis = list(range(X-K+1,X+K))
ans = ""
for char in lis:
  ans = ans + str(char) + " "
print(ans[:-1])

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
b, c = map(int, input().split())
l=b*2-1
lx = c - b + 1
s=str(lx)
for a in range(l-1):
    lx=lx+1
    s += ' ' + str(lx)

print(s)

Submission status: Accepted

Solution code:
import numpy as np
a = [int(i) for i in input().split()] 
K = a[0]
X = a[1]

min_ = np.max([X - K + 1, -10000])
max_ = np.min([X + K - 1, 10000])
print(*[x for x in range(min_,max_+1)])

Submission status: Accepted

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

Submission status: Accepted

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


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

e = x - k + 1
e2 = x + k - 1

for i in range(e, e2+1):
  print(i , end=' ')

Submission status: Accepted

Solution code:
line = input().split()

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

result = []
init_point = x-k+1

for i in range(k*2-1):
  result.append(init_point)
  init_point += 1
  
print(" ".join(map(str, result)))

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
def main():
    a,b=map(int,input().split())
    print(*range(b-(a-1),b+a))
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
i=X-K+1
x=[]
while i<=X+K-1:
    if -1000000<=i<=1000000:
        x.append(str(i))
    i+=1
print(' '.join(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M = map(int, input().split())

X = M-N+1
Y=N*2-1
for i in range(X,X+Y,1):
    if(i>=-1000000):
        print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

min_num = b - a
max_num = b + a

ls = list(range(min_num+1, max_num, 1))

ans_str = ""
for _l in ls:
    ans_str += str(_l) + " "

ans_str = ans_str[:-1]

print(ans_str)

Submission status: Accepted

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

show_data_list = []

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

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

number = len(show_data_list) - 1
for i, data in enumerate(sorted(show_data_list)):
    print(data, end='')
    if number != i:
        print(' ', end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

if l < -1000000:
    l = -1000000
if r > 1000000:
    r = 1000000

x = np.arange(l,r+1)
for i in x:
    print(i, end=" ")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

minpos = X - K + 1
maxpos = X + K 

result = ""
for i in range(minpos,maxpos):

    if result == "":
        result = str(i)

    else:
        result = result + " " + str(i)

print(result)

Submission status: Accepted

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

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

for i in range(2 * k - 1):
    s += str(" {}".format(x - k + i + 1))

print(s[1:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

st=-1000000
en=1000000

stx=max(x-k+1,st)
enx=min(x+k-1,en)
	
res=list(range(stx,enx+1))
    
print(*res)

Submission status: Accepted

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

l=[]
for i in range(-k+1,k):
  l.append(n+i)
  
print(*l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
ans=[]

for i in range(N*2-1):
    ans.append(K-(N-1)+i)
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
nums = [int(s) for s in input().split()]
k = nums[0]
x = nums[1]

box = [s + x - k + 1 for s in range(k * 2 - 1)]

note = str(box[0])
for i in range(len(box) - 1):
  note += " " + str(box[i + 1])
print(note)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
K, X = map(int,input().split())

L = []
L.append(X)
for n in range(K):
  if n < K-1:
    L.append(X-n-1)
    L.append(X+n+1)
sorted_L = sorted(L)
s = ' '.join([str(n) for n in sorted_L])

print(s)

Submission status: Accepted

Solution code:
l = list(map(int, input().split(' ')))
# N = input()
# N = int(input())
K = l[0] #ある連続する K 個の石が黒で塗られており
X = l[1] #座標 Xにある石は黒で塗られている

mi = max(X-K,-1000000)
ma = min(X+K,1000000)
first = 0
for i in range(mi+1,ma):
    if first == 0:
        first=1
    else:
        print(" ",end="")
    print(i,end="")
print()

Submission status: Accepted

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

aa = x - k + 1
if aa < -1000000:
  aa = 0
bb = x + k - 1
if bb > 1000000:
  bb = 1000000

for i in range(aa, bb+1):
  print(i, end=" ")

Submission status: Accepted

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

k1 = max(-1000000, x-(k-1))
k2 = min(1000000, x+(k-1))

ans = []
for i in range(k1, k2+1):
    ans.append(str(i))

print(" ".join(ans))

Submission status: Accepted

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

left = X - (K-1)
if left < -1000000:
    left = -1000000

right = X + (K-1)
if right > 1000000:
    right = 1000000

for i in range(left,right+1):
    print(i,end=" ")

print("")

Submission status: Accepted

Solution code:
K, X = map(int,input().split())
under = max(X - K+1, -1000000)
upper = min(X + K-1, 1000000)
Answer = [under,upper]

for i in range(upper - under):
  print(under+i, end=" ")
print(upper)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

x_min = -1000000
x_max =  1000000

l = x_min
r = x_max

l = max( l, x-k+1 )
r = min( r, x+k-1 )

for i in range(l, r+1):
	print(i, end=' ')

print("")

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for i in range(X - K + 1, X + K):
    if i > -1000000 or i < 1000000:
        ans.append(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
point = [int(i) for i in input().split()] 
point_list = []
for i in range(1,point[0]*2):
    tmp = point[1] - point[0] + i
    point_list.append(tmp)
print(*point_list)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力


def main():
    # a, b
    k, x = (map(int, input().split()))
    print(process(k, x))


def process(k, x):
    l = max(-1000000, x-(k-1))
    r = min(1000000, x+(k-1))
    result = list(map(str, range(l, r+1)))
    return ' '.join(result)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
kx = map(int, raw_input().split())
out = range(kx[1]-kx[0]+1, kx[1]+kx[0])
print(' '.join(map(str, out)))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
min_ = -1000000
max_ =  1000000
k, x = input().split()
k, x = int(k), int(x)
ans = [x]

for i in range(1, k):
  l = x - i
  r = x + i
  if l >= min_:
    ans.insert(0, l)
  if r <= max_:
    ans.append(r)

for n in ans:
  print(n, end=' ')

Submission status: Accepted

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

stone = list(range(kx[1]-(kx[0]-1), kx[1]+kx[0]))

print(" ".join( str(s) for s in stone ))

Submission status: Accepted

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

int_list = list(range(b-a+1,b+a))

str_list = map(str, int_list)

mojiretu = ' '.join(str_list)

print(mojiretu)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
K, X = map(int, input().split())

axis = [str(i) for i in range(X - (K - 1), X + K)]

print(' '.join(axis))

Submission status: Accepted

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

ans = []

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

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

Submission status: Accepted

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

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

print('')

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
min = x - (k - 1)
max = x + (k - 1)
if min < -1000000:
  min = -1000000
if max > 1000000:
  max = 1000000

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b= (int(i) for i in input().split()) 

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

k, x = MAP()

l = []


# l.append(x+1)
# l.append(x)
# l.append(x-1)
# for j in range(x):
for i in range(k):
    # print(x-i)
    # print(x+i)
    l.append(x-i)
    l.append(x+i)
    # l.append(x-i)
l.sort()
s = set(l)
l = list(s)
# print(l)
l.sort()
# print(l)
# s = ",".join(l)
# print(s)
s_l = []

for i in l:
    s_l.append(str(i))
    s_l.append(" ")
print("".join(s_l))

# for i in l:
#     print(i)
# s = "".join(l)
# print()
# print(l.join(","))
# for i in range(l)
# print(l)

Submission status: Accepted

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

Submission status: Accepted

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

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

    ans = list(range(max(-10 ** 6, x - k + 1), min(x + k, 10 ** 6)))
    return ans

if __name__ == '__main__':
    print(*main(), sep = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

min_num = max(-1000000, X-(K-1))
max_num = min(1000000, X+(K-1))
print(*list(range(min_num, max_num+1)))

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

a=""

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

print(a)

Submission status: Accepted

Solution code:
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  # setrlimit works on ubuntu (and atcoder), but not on WSL
  #resource.setrlimit(RLIMIT_STACK, (128*1024*1024,hard))

k,x = inm()
mn = max(-1000000,x-k+1)
mx = min(1000000,x+k-1)
for i in range(mn,mx+1):
    printn(('' if i==mn else ' ') + str(i))
print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split(' '))
x_min = x - k + 1 if x - k + 1 >= -1000000 else -1000000
x_max = x + k - 1 if x + k - 1 <=  1000000 else  1000000
print(' '.join(map(str, range(x_min, x_max + 1))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

lower = X - K + 1
upper = X + K - 1
ans = [i for i in range(lower, upper+1)]
ans_str = " ".join(list(map(str, ans)))
print(ans_str)

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
ans_set = set()
for i in range(x-k+1, x+k):
  if i >= -1000000 or i <= 1000000:
    ans_set.add(i)

print(*sorted(ans_set))

Submission status: Accepted

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

c = b - (a - 1)
d = b + (a - 1)


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

Submission status: Accepted

Solution code:
str = input()

K = (int(str.split()[0]))
X = (int(str.split()[1]))
min = -1000000
max = 1000000

print("{}".format(X - K + 1), end="")
for i in range(X - K + 2, X + K) :
	print(" ", end="")
	if (min <= i and i <= max):
		print("{}".format(i), end="")
print()

Submission status: Accepted

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

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

for i in range(1,K):
    ans.append(X + i)
print(" ".join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputs = [int(s) for s in input().split()]
k = inputs[0]
x = inputs[1]

n = (k-1)*2+1

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

Submission status: Accepted

Solution code:
K,X=map(int, input().split())
a=()
m=-1000000 if X-K+1<-1000000 else X-K+1
h=1000000 if X+K-1>1000000 else X+K-1
L=[]
for i in range(m, h+1):
  L.append(str(i))

a=' '.join(L)
print(a)