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())
s = x-k
e = x+k
ans = []


for i in range(s+1,e):
  i = str(i)
  ans.append(i)
  
print(' '. join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(k, x):
    n_min = x - (k - 1)
    n_max = x + (k - 1)

    return ' '.join([str(i) for i in range(n_min, n_max + 1)])

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

Submission status: Accepted

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

L = [i for i in range(X-K+1, X+1)]
R = [i for i in range(X+1, X+K)]

print(*(L+R))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
ans = ''
for i in range(2 * k - 1):
    ans += str(x - (k - 1) +  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,end=' ')
  
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = [int(x) for x in input().split()]
rl = max(-1000000, x - k + 1)
rr = min(+1000000, x + k - 1)
print(*(range(rl, rr + 1)))

Submission status: Accepted

Solution code:
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    K, X = map(int, input().split())
    low = max(-1000000, X - K + 1)
    up = min(1000000, X + K - 1)

    ans = []
    for i in range(low, up + 1):
        ans.append(str(i))
    print(' '.join(ans))


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k,x=map(int,input().split())
    limit = 1000001
    left = max(x-k, -limit) + 1
    right = min(x+k, limit)
    print(*range(left, right))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
ans=[]
for i in range(k):
    if -1000000<=x-i:
        ans.append(x-i)
    ans.append(x)
    if x+i<=1000000:
        ans.append(x+i)
ans=set(ans)
ans=list(ans)
ans=sorted(ans)
for i in range(len(ans)):
    print(ans[i])

Submission status: Accepted

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

print(*list)

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:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    k, x = map(int, input().split())
    print(*list(range(x - k + 1, x + k)))


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
k,x = map(int, raw_input().split(' '))
ee = range(max(x - k+1,-1000000), min(x + k,1000000))
print ' '.join(map(str,ee))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,s= map(int,input().split())
min = s-n+1
max =s+n
if(s-n<-1000000): min = -1000000
if((s+n)>1000001): max = 1000001
for i in range(min,max):
  print(i,end=" ")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
begin = max(-1000000, X-K+1)
end = min(1000000, X+K-1)
print(' '.join(list(map(str, range(begin, end+1)))))

Submission status: Accepted

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

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

left = max( -1000000 , left)
right = min( 1000000 , right)

print(' '.join(list( map(str,range(left,right+1)) )))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

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

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

print(*ans)

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
xMin = -1000000
xMax =  1000000

ans = list(range(max(x-k+1, xMin), min(x+k, xMax+1)))
for a in ans:
    print(a, end=' ')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k, x = map(int, input().split())
a = []
for i in range(x-k+1,x+k):
    a.append(i)
a = list(map(str, a))
print(" ".join(a))

Submission status: Accepted

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

for x in range(X - K + 1, X + K, 1):
    array.append(str(x))
print(" ".join(array))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans=[int(x) for x in range(b-a+1,b+a)]
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())
print(*[x for x in range (X-K+1, X+K)])

Submission status: Accepted

Solution code:
K,X=map(int,input().split())#二つの数字をペアで入力。この時スペース区切りでInt型に変換

print(*[i for i in range(X-K+1,X+K)])# X-K+1からX+Kまでのリストを作成しprint(*)で出力

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
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:
def main():
    K, X = map(int, input().split())
    mi = int(max(X-K+1, -1e6))
    ma = int(min(X+K, 1e6+1))
    black = [i for i in range(mi, ma)]
    print(*black)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve():
  k, x = map(int, input().split())
  if x-k+1 < -1000000:
    ans = list(range(-1000000,x))+list(range(x,x+k))
  elif x+k-1 > 1000000:
    ans = list(range(x-k+1,x))+list(range(x,1000000))
  else:
    ans = list(range(x-k+1,x))+list(range(x,x+k))
  ans = map(str, ans)
  print(" ".join(ans))
  return 0
 
if __name__ == "__main__":
  solve()

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    K, X = map(int, readline().split())
    print(*list(range(X - K + 1, X + K)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k * 2 - 1):
    print(m - k + 1 + 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(*ans)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

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

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

print(ans.rstrip())

Submission status: Accepted

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

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

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([str(n) for n in range(max(-1000000, X - K + 1), min(1000001, X + K))]))

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

c = []

for i in range(-k+1,k):
  c.append(x-i)
  
c.sort()
t = [str(i) for i in c]
print(' '.join(t))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(k)
# print(x)


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

print(' '.join(l))

Submission status: Accepted

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

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

result = list(set(result))
result.sort()
print(*result)

Submission status: Accepted

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

l = k*2 -1

m = x - k + 1

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

Submission status: Accepted

Solution code:
r,n = map(int,input().split())
ans = []
ans.append(n)
for l in range(r-1):
    ans.append(n + (l + 1))
    ans.append(n - (l + 1))
ans.sort()
print(*ans)

Submission status: Accepted

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

outList = [str(x) for x in range(argList[1]-argList[0]+1,argList[1]+argList[0])]
print(" ".join(outList))

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
start = x - (k-1)
end = x + (k-1)
if start <= -1000000:
    start = -1000000
if end >= 1000000:
    end = 100000
print(' '.join(map(str, list(range(start, end+1)))))

Submission status: Accepted

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

Submission status: Accepted

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

f02()

Submission status: Accepted

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

print(*[i for i in range(X-K+1, X+K)])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def one_clue(k, x):

    ans = []

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

    return ans

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
a = [X]
if K == 1 :
    print(*a)
    exit()

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

print(*(sorted(a)))

Submission status: Accepted

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

print(' '.join(L))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
result1 = [i for i in range(X, X-K, -1)]
result2 = [i for i in range(X, X+K)]
result1.extend(result2)
result1 = list(set(result1))
for i in sorted(result1):
  if i == len(result1)-1:
    print(str(i))
  else:
    print(str(i) + ' ', end='')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*arr)

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
k -= 1
a = x-k if -1*10**6 <= x+k else -10**6
b = x+k if x+k <= 10**6 else 10**6
ans = list(range(a,b+1))
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = map(int,input().split())
amin = X - K + 1
amax = X + K - 1
if amin < -1000000:
    amin = -1000000
if amax > 1000000:
    amax = 1000000

answer = []
for i in range(amin, amax+1):
    answer.append(i)
print(*answer)

Submission status: Accepted

Solution code:
# ABC137B

k, x = 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())
print(" ".join(map(str,range(x-k+1,x+k))))

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
List=[]
i=X-K+1
while i<=X+K-1:
    if i < -1000000 or i>1000000:
        pass
    else:
        List.append(i)
    i+=1
    
print(*List)

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
import numpy as np
#print(x-k+1,x+k-1+1)
a=[str(ii) for ii in np.arange(x-k+1,x+k-1+1)]
print(" ".join(a))

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    k, x = LI()
    lim = 10**6
    ans = []
    for p in range(-lim, lim + 1):
        if abs(p - x) <= k - 1:
            ans.append(p)
    print(' '.join([str(x) for x in ans]))

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# input
K, X = map(int, input().split())
R_max = -(10 ** 6)
L_max = 10 ** 6

# check
result = [X]
for R, L in zip(range(K - 1, -1, -1), range(0, K, 1)):
    result += [X - r for r in range(1, R + 1) if X - r >= R_max and X - r not in result]
    result += [X + l for l in range(1, L + 1) if X + l <= L_max and X + l not in result]

# output
result.sort()
op = ""
for res in result:
    op += str(res)
    op += " "

print(op[:-1])

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())
left = x - k + 1
right = x + k - 1
for i in range(max(left, -10000000), min(right, 10000000)+1):
    print(i, end=' ')

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())
num = [x]

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

print(' '.join(map(str, sorted(num))))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May 15 00:27:34 2020

@author: Kanaru Sato
"""

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

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

print(" ".join(points))

Submission status: Accepted

Solution code:

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

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
k,x=map(int,stdin.readline().split())
for i in range(x-k+1,x+k):
    print(i,end=" ")

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
print(' '.join(list(map(str, range(x - (k - 1), x + (k - 1) + 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())
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):
    print(i,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(k, x):
    B = []
    l = max(-1000000, x - k + 1)
    r = min(1000000, x + k - 1)
    for i in range(l, r + 1):
        B.append(i)
    return B

def main():
    k, x = map(int, input().split())
    ans = solve(k, x)
    print(' '.join(list(str(a) for a in ans)))

if __name__ == "__main__":
    main()

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

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

#############
# Main Code #
#############

K,X = inputIL()

ANS = [i for i in range(X-K+1,X+K)]
print(*ANS,sep=" ")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(len(s)-1):
    print(s[i] ,end=' ')
print(s[len(s)-1])

Submission status: Accepted

Solution code:
#from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    k,x = mi()
    a = range(x-(k-1),x+(k-1)+1)
    print(*a)


main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
max = X + K 
min = X - K + 1
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-1)+1):
    print(i, end=' ')
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range((k-1)*2+1):
    x += 1
    print(x-k)

Submission status: Accepted

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

Submission status: Accepted

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

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

seq = list(range(left, right))
print(*seq)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

lst.sort()
ans = ''
for i in range(len(lst)):
    num = lst[i]
    ans += str(num)
    ans += ' '

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


k, x = Is()
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())
ans=[]
n=0
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())

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

print(*apple)

Submission status: Accepted

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

s = x-k+1

f = x+k-1

if s<-1000000:
    s = -1000000
    
if f>1000000:
    f = 1000000
    
for i in range(s,f+1):
    print(i,end = " ")