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())
# k = 1
# x = 20

head = x-(k-1)
tail = x+(k-1)

ans = str(head)
for i in range(head+1,tail+1):
    ans = ans + " " + str(i)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = []
for i in range(start, end):
    ans.append(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = input().split()

K=int(N[0])
X=int(N[1])

num=np.arange((X-(K-1)),(X+K),1)

for  item in num:
    print(item,end=' ')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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


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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
hoge = max([b - abs(a-1),-1000000])
fuga = min([b + abs(a),1000000])
res = [str(i) for i in range(hoge, fuga)]
print(" ".join(res))

Submission status: Accepted

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

mostMin = max(-1000000, X+1-K)
leastMax = min(1000000, X+K)

print " ".join([str(x) for x in xrange(mostMin, leastMax)])

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    K, X = MAP()
    ans = [0] * (2*K - 1)

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

    print(*ans, sep=" ")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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

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

Submission status: Accepted

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

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

for i in range(min, max+1):
  r.append(str(i))

ans = ' '.join(r)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys

input = sys.stdin.readline

def main():
    K, X = map(int, input().split())
    n = map(lambda x: str(x), filter(lambda x: x >= -1000000 and x <= 1000000, [i for i in range(X-(K-1), X+K)]))
    print(" ".join(n))

main()

Submission status: Accepted

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

for i in range(X-K+1,X+K):
  if i <-1000000:
    pass
  elif i>1000000:
    break
  else:
    list.append(i)

print(*list)

Submission status: Accepted

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

_max = x + k -1
_min = x - k + 1
print(' '.join(str(i) for i in range(_min, _max + 1)))

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
min_x = x-k+1
list_x = [0]*(2*k-1)
count = 0
for i in range(2*k-1):
    list_x[i] = str(min_x + count)
    count += 1

print(" ".join(list_x))

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:
K,X = map(int,input().split())
maxlim = 1000000
minlim = -1000000
minx = X-K
maxx = X+K
ans_l = [str(i) for i in range(minx+1,maxx)]
print(" ".join(ans_l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k_1 = k - 1

for n in range(x-k_1,x+k_1+1):
    n = str(n)
    ans.append(n)

aa = " ".join(ans)    
print(aa)

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect


from math import factorial
# 組み合わせ
def combinations_count(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

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

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




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# ABC137 B

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    k, x = LI()
    min_ = max(-1000000, x - k + 1)
    max_ = min(1000000, x + k - 1)
    print(" ".join([str(i) for i in list(range(min_, max_ + 1))]))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

mi = max(-10 ** 6, x - k + 1)
mx = min(10 ** 5, x + k - 1)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def solve(k, x):
  min_x = max(-1000000, x - k + 1)
  max_x = min(x + k - 1, 1000000)
  ans = [i for i in xrange(min_x, max_x + 1)]
  print " ".join(map(str,ans))


if __name__ == '__main__':

  k, x = map(int, sys.stdin.readline().strip().split(" "))
  solve(k, x)

Submission status: Accepted

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

print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

mn = x - k + 1
mx = x + k - 1

ans = ""
for i in range(mn, mx+1):
    ans += str(i) + " "

ans = ans.rstrip()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

list = []

for i in range(k-(n-1), k+(n-1)+1, 1):
    list.append(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    token = lines[0].split()
    k = int(token[0])
    x = int(token[1])

    return (k, x)


def solve(k, x):


    start = max(-1000000, x - (k-1))
    end = min(1000000, x + (k-1))

    result = " ".join([str(i) for i in range(start, end + 1)])
        

    return result


def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

k, x = map(int, input().split())
idx = x + 1000000
a = np.arange(-1000000,1000001)
for i in range(2*k-1):
  print(a[idx-k+1+i], end=" ")

Submission status: Accepted

Solution code:

k,x = map(int,input().split())
ans = []
for i in range(2*k-1):
    if x -k + i +1  < -1000000:
        continue
    elif x -k + i + 1 > 1000000:
        continue
    else:
        ans.append(x-k+i+1)
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = []

shift = -K+1
for i in range(2*K-1):
    if X+shift< -1000000 or X+shift > 1000000:
        continue
    ans.append(X+shift)
    shift += 1
    
for s in ans:
    print(s,end=" ")

Submission status: Accepted

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

min_X = min(max(-1000000, X-(K-1)), 1000000)
max_X = min(max(-1000000, X+(K-1)), 1000000)

string = [str(i) for i in range(min_X, max_X+1)]
print(' '.join(string))

Submission status: Accepted

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

Submission status: Accepted

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

K = int(k)
X = int(x)

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 - 1) + 1)]
for i in range(len(ans)):
    if i != len(ans) - 1:
        print(ans[i],'',end="")
    else:
        print(ans[i])

Submission status: Accepted

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

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

A = [i for i in range(start,  end + 1)]
print(*A)

Submission status: Accepted

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

# x-(k-1)からx+(k-1)
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

h = list(range(a, b+1))
f = []
for i in h:
    f.append(str(i))
print(' '.join(f))

Submission status: Accepted

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

lb = X-(K-1)
ub = X+(K-1)

lb = max(-1000000,lb)
ub = min(1000000,ub)

L = list(range(lb,ub+1))

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

Submission status: Accepted

Solution code:
K,X=map(int, input().split())
L=-10**6
R=10**6
mini=max(L,X-K+1)
maxi=min(R,X+K-1)
for i in range(mini, maxi+1):
  print(i, end=" ")
print()

Submission status: Accepted

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

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

print(*l)

Submission status: Accepted

Solution code:
# 2
# Xの座標から、X含めK分対象となる。
# X - K +1 < ... < X < X + K -1
# 今回、上限、下限値に触れることはない。

K, X = map(int, input().split())
res = ""
for i in range(X - K + 1, X + K):
    if i != X + K:
        res = str(res + str(i) + " ") 
    else:
        res = str(res + str(i)) 

print(res)

Submission status: Accepted

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

ans = []

#x - (k - 1) ~ x + (k - 1)

for i in range(x - k + 1,x + k):
  if i < -1000000 or i > 1000000:
    continue
  print(i,end=" ")

Submission status: Accepted

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

assert(1<= K <= 100)
assert(0<=X<=100)

left = X - (K - 1)
left = max(left, -1000000)

right = X + (K - 1)
right = min(right, 1000000)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

m, M = x-k, x+k
if m < -100000:
    m = -100000
if M > 100000:
    M = 100000

for i in range(m+1, M-1):
    print(str(i) + ' ', end="")
print(M-1)

Submission status: Accepted

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

diff = k-1

for i in range(x-diff, x+diff+1):
    print(i)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(*a)

Submission status: Accepted

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

if k == 1:
    print(str(x))
else:
    a_list = [x]
    for i in range(1, k):
        a_list.append(x+i)
        a_list.append(x-i)

    a_list.sort()

    print(' '.join([str(a) for a in a_list]))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019 8/10
# ABC137 B

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

length = 2 * K - 1
left = X - K + 1

for i in range(length):
    print(left + i, end=' ')

print('')

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
m = 10 ** 6
x_min = max([-m, x - (k - 1)])
x_max = min([ m, x + (k - 1)])
print(' '.join(map(str, range(x_min, x_max+1))))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    kx = input().split()
    # print(kx)
    k, x = int(kx[0]), int(kx[1])
    l = max(-1000000, x-(k-1))
    r = min(1000000, x+(k-1))
    output = []
    for i in range(l, r+1):
        output.append(i)
    return output


if __name__ == '__main__':
    output = main()
    print(' '.join(map(str, output)))

Submission status: Accepted

Solution code:

k, x = map(int, input().split())
m = x - k + 1
l = x + k - 1

ptn = []
for i in range(m, l+1):
    ptn.append(i)

print(' '.join(list(map(str, ptn))))

Submission status: Accepted

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

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

Submission status: Accepted

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

a = []

for i in range(2*k-1):
    a.append(x-k+1+i)
    
print(*a)

Submission status: Accepted

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

lis=[]

for i in range(x-k+1,x+k):
    if i>=-10000000 and i <=1000000:
        lis.append(i)

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

Submission status: Accepted

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

x - k + 1
x + k - 2

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

if(x + k - 1 <= 1000000):
    xmax = x + k - 1
else:
    xmax = 1000000

arr = []

for x in range(xmin, xmax+1):
    arr.append(str(x))

print(' '.join(arr))

Submission status: Accepted

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

Submission status: Accepted

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


def solve(K, X):
    left = max(X-K+1, -1000000)
    right = min(X+K-1, 1000000)
    ans = range(left, right+1)
    return ans


if __name__ == '__main__':
    K, X = map(int, input().split())

    ans = solve(K, X)

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

Submission status: Accepted

Solution code:

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

result = []
for i in range(-1000000,1000001):
    if x-k < i and i < x + k:
        result.append(str(i))
print("{}".format(' '.join(result)))

Submission status: Accepted

Solution code:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    KX = list(map(int, input().split()))
    K = KX[0]
    X = KX[1]

    low = X - K + 1
    up = X + K - 1

    if low <= -1000000:
        low = -1000000
    if up >= 1000000:
        up = 1000000

    ary = np.arange(start=low, step=1, stop=up+1)
    ary = ary.astype("str")
    li = list(ary)
    ans = " ".join(li)

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

def main():
    K,X = map(int, input().split())
    P = max(-1000000, X-(K-1))
    Q = min(1000000, X+(K-1))

    print(' '.join(map(str, [k for k in range(P, Q+1)])))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print()

Submission status: Accepted

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

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:
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:
li = list(map(int,input().split()))
K = li[0]
X = li[1]
L = list(range(X-K+1,X+K))
for l in L:
    if -10000 <= l <= 10000:
        print(l,end=' ')

Submission status: Accepted

Solution code:
"""
AtCoder
    :author: vierbein
"""
from __future__ import absolute_import, division, print_function

# import itertools as it
# import collections
import sys


def pp(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)


K, X = map(int, input().split())
res = range(max(-1000000, X-K+1), min(100001, X + K))
print(*res)

Submission status: Accepted

Solution code:



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



minimum = max(X - (K - 1), -1000000)
maximum = min(X + (K - 1), 1000000)

ans = list(range(minimum, maximum + 1))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter
input = sys.stdin.readline
A,B=map(int,input().split())
for i in range(B-(A-1),A+B):
  if i != A+B-1:
    print(i,end=' ')
  else:
    print(i,end='')

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
mx = max(-1000000, x - k + 1)
nums = []
for i in range(k * 2 - 1):
    if mx + i > 1000000:
        break
    nums.append(mx + i)
print(' '.join(map(str, nums)))

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 s in ans:
    print(s,end=" ")

Submission status: Accepted

Solution code:


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


s = k-x+1
num = x*2-1

for i in range(num):
    print(s+i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC137B
import copy
import sys
import math

#n = int(input())
tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

k=hoge[0]
x=hoge[1]

ans=""
for i in range(0,2*k-1):
	if((x-k+1+i) >=(-1000000))and((x-k+1+i)<=1000000):
		if(len(ans)!=0):
			ans+=" "
		ans+=str(x-k+1+i)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

li = []

if X-K < -1000000:

  for i in range(-1000000, -1000000 + K):
    li.append(i)
elif X+K >1000000:
  for i in range(1000000 - K, 1000000):
    li.append(i)
else:
  for i in range(X-K+1, X+K):
    li.append(i)

print (' '.join(map(lambda x: str(x), li)))

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
ra=range(max(-1000000,k-(n-1)),min(1000000+1,k+(n-1)+1))
li=[i for i in ra]
print(*li,sep=' ')

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
k = k-1
Min = x - k
Max = x + k
if(Min<=-1000000):
  Min = -1000000
if(Max>=1000000):
  Max = 1000000
n = Min
while True:
  print(n)
  if(n==Max):
    break
  n+=1

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
input = sys.stdin.readline


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

    for i in range(x - (k - 1), x + (k - 1) + 1):
        if abs(i) > 1000000:
            continue

        if i != x + (k - 1):
            print("{} ".format(i), end="")
        else:
            print("{}".format(i), end="")
    print()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = ''

for i in range(x-k+1, x+k):
  ans += str(i) + ' '

print(ans.rstrip(' '))

Submission status: Accepted

Solution code:
k,x=map(int, input().split())
a=list(range(x-(k-1), x+(k-1)+1))
b=[i for i in a if -1000000<=i<=1000000]
string=""
for v in b:
    string+=str(v)+" "
print(string)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
k,x=map(int,input().split())
print(' '.join(str(c) for c in range(max(x-(k-1),-1000000), x+k)))

Submission status: Accepted

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

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

mod = 1000000007

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

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

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

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

if __name__ == "__main__":
    K, X = map(int, sys.stdin.readline().split())
    ls = []
    for i in range(max(-1000000, X - K + 1), X):
        ls.append(i)
    for i in range(X, min(X + K, 1000001)):
        ls.append(i)

    print(*ls)

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

I=np.array(input().split(),dtype=np.int32)

K=I[0]
X=I[1]

result=""

for x in range(X-(K-1),X+K):
    result=result+str(x)+" "

print(result)

Submission status: Accepted

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

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

print(" ".join([str(x) for x in range(X - K + 1, X + K)]))

Submission status: Accepted

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

print(*list)

Submission status: Accepted

Solution code:

def main():
    k,x = map(int,input().split())
    ans = set()
    for i in range(k):
        if  -1000000<=x+i<=1000000:
            ans.add(x+i)
        if  -1000000<=x-i<=1000000:
            ans.add(x-i)
    ans = list(ans)
    ans = sorted(ans)
    for i in ans:
        print(i,end=" ")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

print(str(X) + " ")

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

Submission status: Accepted

Solution code:
K, X = map(int, input().rstrip().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())
ans = []
for i in range(0,2*k - 1):
    ans.append(x-(k-1)+i)
print(*ans)

Submission status: Accepted

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

mini = S[1]-S[0]+1
deka = S[1]+S[0]
arr = [i for i in range(mini,deka)]
for i in range(len(arr)):
    print(arr[i],end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

    ans = []
    for i in range(b - a + 1, b + a):
        ans.append(str(i))

    print(" ".join(ans))


if __name__ == '__main__':
    p_b()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(" ".join(results))

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:
K, X = map(int ,input().split())
print(" ".join(map(str, range(X - K + 1, X + K))))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = []

for i in range(kosuu):
  ans.append(zahyou+i)
  if i != 0:
    ans.append(zahyou-i)


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

Submission status: Accepted

Solution code:
import  numpy   as  np

Input   =       input().split()
K       =       int(Input[0])
X       =       int(Input[1])

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