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())
l = [x]
for i in range(1, k):
    l.append(x + i)
    l.append(x - i)
l.sort()
l1 = [str(a) for a in l]
l2 = ' '.join(l1)
print(l2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - One Clue

K, X = map(int, input().split())
print(*[x for x in range(X - K + 1, X + K) if -1000000 <= x <= 1000000])

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

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

ans_range = list(range(X-K+1,X+K))
ans_range = ' '.join(map(str, ans_range))
print(ans_range)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, heapq

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

kuro=[]
for i in range(x-n+1,x):
    kuro.append(i)
for i in range(x,n+x):
    kuro.append(i)
for i in range(len(kuro)):
    kuro[i]=str(kuro[i])
kuro=" ".join(kuro)
print(kuro)

Submission status: Accepted

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

l = []
a = - K + 1
b = K
for i in range(a, b):
    l.append(X - i)
l = sorted(l)
ans = " ".join(map(str,l))
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
left=max(-10000,x-k+1)
right=min(10000,x+k-1)
#ans=right-left+1
#print(ans)
ans=[]
for i in range(left,right+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):
  print(i)

Submission status: Accepted

Solution code:
def main():
    K, X = (int(x) for x in input().split())
    mini = X - K + 1
    maxi = X + K
    ans = [x for x in range(mini, maxi, 1)]
    ans = " ".join(map(str, ans))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print(*range(b-a+1,a+b))

Submission status: Accepted

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

for kuro in range(X-K+1, X+K):
  print(kuro, 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:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

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 i in range(l, r+1):
  print(i, end=" ")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(" ".join(nums))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
for i in range(-(k-1), k):
  ans = x + i
  #if ans < -1000000 or ans > 1000000:
  #  continue
  print(ans, 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:
# 初期入力
import sys
input = sys.stdin.readline
K_black_num,X_coordinate = (int(x) for x in input().split())

#
start = X_coordinate -K_black_num +1
finish =X_coordinate +K_black_num -1

x =[i for i in range(start,finish+1) ]
print(*x)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
kagen=max([-1000000,x-k+1])
jyogen=min([1000000,x+k-1])
lis=[]
for i in range(kagen,jyogen+1):
  print(i,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3

def main():
    K, X = map(int, open(0).read().split())

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=X-K+1

print(ans,end="")

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
n = x-k+1
while n <= x+k-1:
  print(n,end=' ')
  n += 1

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# B - One Clue

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
	k, x = map(int,input().split())
	i = x-k+1
	while i<x+k:
		print(i,end=' ')
		i+=1
	



main()

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    else:
        ans += str(l[i]) + ' '
print(ans)

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:
# coding: utf-8
k, x = [int(x) for x in input().split()]
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:
# coding: utf-8
k, x = map(int, input().split())
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:
A, B = map(int, input().split())

wa = A + B - 1
sa = B - A + 1

for i in range(sa, wa+1):
    print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
ans = [x]
for i in range(1, k):
    ans.append(x-i)
    ans.append(x+i)
ans.sort()
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(i)
print(' '.join(map(str, a)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = []
cnt = -(k-1)

for i in range(k+k-1):
    l.append(x+cnt)
    cnt+=1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

for j in range(n[1]-(n[0]-1),n[1]+(n[0]-1)+1):print(j,end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A=[]
B=[]

for i in range(0,a):
  A.append(b+i)
  B.append(b-i)
C=A+B
D=sorted(set(C))
D=[str(a) for a in D]
D=' '.join(D)
print(D)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = [int(s) for s in input().split()]
temp_list = list(range(x - k + 1, x + k))
ans = " ".join([str(temp) for temp in temp_list])
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())
A = []
for i in range(K):
  A.append(str(X-K+i+1))
for i in range(K-1):
  A.append(str(X+i+1))
ans = " ".join(A)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

point = []
point.append(num[1])
for i in range(num[0] - 1):
  point.append(num[1] + i + 1)
  point.append(num[1] - i - 1)

m = 0
for i in range(len(point)):
  if point[i - m] > 1000000 or point[i - m] < -1000000:
    del point[i - m]
    m = m + 1

point.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    k,x = map(int, input().split())
    l = x-k+1
    r = x+k-1
    res = []
    for i in range(l, r+1):
        if -1000000<=i<=1000000:
            res.append(i)
    print(*res)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = int(a)
b = int(b)

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    K, X = map(int, input().split())
    LOWER = max(X - K + 1, -1000000)
    UPPER = min(X + K - 1, 1000000)
    ans = [str(i) for i in range(LOWER, UPPER+1)]
    print(" ".join(ans))

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
# ABC 137: B – One Clue
K, X = [int(s) for s in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = list(map(int, input().split()))
print(*[i for i in 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.append(str(i))

ans = ' '.join(ans)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    k, x = mi()
    for i in range(x - (k-1), x + (k-1) + 1):
        print(i, end=' ')
    print('')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    K, X = il()
    B = set(range(X - K + 1, X + 1))
    A = set(range(X, X + K))
    for i in sorted(B | A):
        print(i)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

s=k*(-1) + 1

for i in range(s,k):
  print(x+i,end=" ")

print()

Submission status: Accepted

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

L = X - K
R = X + K

answer = []

for i in range(-1000000, 1000001):
  if L < i < R:
    answer.append(i)

print(' '.join(str(x) for x in answer))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    k,x=map(int,input().split())
    kmin=x-k+1
    kmax=x+k-1
    for kk in range(kmin,kmax+1):
        print(kk,end=" ")
    print()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
A = X - (K-1)
B = X + (K-1)
ans = []

for i in range(A,B+1):
    ans.append(i)

for x in range(len(ans)):
  print(ans[x])

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
if X-(-1000000)<=K:
  print(' '.join(map(str, list(range(-1000000, X+K)))))
elif 1000000-X<=K:
    print(' '.join(map(str,list(range(X-K+1, 1000000)))))
else:
    print(' '.join(map(str,list(range(X-K+1, X+K)))))

Submission status: Accepted

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

Submission status: Accepted

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

if min_num < -1000000:
    min_num = -1000000
if 1000000 < max_num:
    max_num = 1000000

num_list = list(range(min_num, max_num + 1))
num_list = [str(x) for x in num_list]
print(" ".join(num_list))

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
ans = list()
i = -(K-1)
while i<K:
    ans.append(X+i)
    i+=1
print(*ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""

A, B = map(int, input().split())
ans = [B]

for i in range(1, A):
    ans.append(B + i)
    ans.append(B - i)


ans = sorted(ans)
print(*ans)






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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  K, X = map(int, readline().split())
  left = max(-1000000, X-K+1)
  right = min(X+K-1, 1000000)
  
  print(' '.join(map(str, range(left, right+1))))
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

for a in l:
    print(a, end=' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

if smallest<-100000:

    biggest+=smallest+100000
    smallest=-100000

elif biggest>100000:
    smallest+=biggest-100000
    biggest=100000



nums=[i for i in range(smallest,biggest+1)]




ans=str("")
for n in nums:
    ans+=str(n)+" "
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

s = str(x - k + 1)

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

print(s)

Submission status: Accepted

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

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))
b = " ".join(a)
print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = list(map(int,input().split()))
A = [None for _ in range(2*K - 1)]
for i in range(-(K-1) ,K):
  A[i] = X - i
B = sorted(A)
print(' '.join(map(str, B)))

Submission status: Accepted

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