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

MIN = X - (K-1)
MAX = X + (K-1)
out = str(MIN)

for i in range(MIN+1, MAX+1):
    out += " "+ str(i)
    
print(out)

Submission status: Accepted

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

maxv = x + (k-1)
minv = x - (k-1)
if maxv > 1000000:
  maxv = 1000000
  
if minv < -1000000:
  minv =  -1000000

ans = ''
for i in range(maxv-minv+1):
  ans += ' ' + str(minv+i) 
  
ans = ans.strip()
print(ans)

Submission status: Accepted

Solution code:
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:
k, x = map(int, input().split())
i = 0
l = list()
if k == 1:
    print(x)
else:
    while i < k*2-1:
        l.append(x + k - 1)
        x -= 1
        i += 1
l.sort()
print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numbers =input().rstrip().split(" ")
consective =int(numbers[0])
X =int(numbers[1])
minimum =X-consective+1
maximum =X+consective-1
if minimum<=-1000000:
  minimum=-1000000
if maximum>=1000000:
  maximum=1000000
for i in range(minimum,maximum+1):
  print(i ,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

res = []

for i in range(k):
  Pi = x + i
  Ni = x - i
  if Pi == Ni:
    res.append(Pi)
  elif Pi > 1000000:
    res.insert(0,Ni)
  elif abs(Ni) > 1000000:
    res.append(Pi)
  else:
    res.append(Pi)
    res.insert(0,Ni)


r = [str(i) for i in res]
result = ' '.join(r)
print(result)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

black = []

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

print(' '.join(str(i) for i in black))

Submission status: Accepted

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

a = np.arange(X-K+1, X+K)
print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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().strip().split())
for i in range(max(-1000000,x-k+1),min(10**6,x+k)):
    print(i,end=' ')
print()

Submission status: Accepted

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

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(' '.join(map(str, list)))

Submission status: Accepted

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

ansl = []
j = 0
for i in range(-200,200):
    if i > X - K and i < X + K:
        ansl.append(i)
for a in ansl:
    s = str(a)
    print(s, end="")
    if len(ansl)-1 != j:
        print(" ", end="")
        j+=1

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

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

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import exit

if __name__ == "__main__":
    k, x = map(int, input().split())
    if k == 1:
        print(x)
        exit()

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

Submission status: Accepted

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

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:

def main():
    K, X = [int(x) for x in input().split()]
    left = X - K + 1
    right = X + K
    ans = range(left, right)
    print(*ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k, x = map(int, input().split())  # 複数数値入力

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
l = x - k + 1
r = x + k
if l < -100000:
  r -= l + 100000
  l = -100000
if r > 100001:
  l -= r - 100001
  r = 100001
A = range(l,r,1)
print(' '.join(map(str,A)))

Submission status: Accepted

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

a = X - 1 + K
b = X + 1 - K

A = list(range(X, a+1))
B = list(range(b, X))

ans = ' '.join(map(str, B+A))
print(ans)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc137/tasks/abc137_b
k, x = map(int, input().split())
if k == 1:
    print(x)
    exit()
print(" ".join(map(str, list(range(x - k + 1, x + k )))))

Submission status: Accepted

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

l = max(-1000000, X - K + 1)
r = min(1000000, X + K - 1)
print(*[i for i in range(l, r + 1)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]

K, X = int_list[0], int_list[1]

import numpy as np
x = np.arange(X-K+1, X+K)
for i in range(len(x)):
    if i < len(x)-1:
        print('%d ' % x[i], end="")
    else:
        print(x[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
A=a.split()
B=[]
for i in range(2*int(A[0])-1):
   B.append(int(A[1])-int(A[0])+1+i)
L=[str(a) for a in B]
L=" ".join(L)
print(L)

Submission status: Accepted

Solution code:
import numpy as np
k,x = map(int,input().split())
ans = np.arange((x-k+1),(x+k))
for i in range(len(ans)):
    print(ans[i], end = " ")

Submission status: Accepted

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

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())
min_X = X - (K - 1)
max_X = X + (K - 1)
answer_list = [i for i in range(max(min_X, -1000000), min(max_X + 1, 1000001), 1)]
print(" ".join(map(str, answer_list)))

Submission status: Accepted

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

def printRange(a,b): #aからbまでをスペース区切りで出力
	for i in range(a,b+1):
		print(i,end=' ')

printRange(max(x-k+1,-1000000),min(x+k-1,1000000))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -1,000,000~1,000,000
# ある連続するK個が黒で他は白
# Xは黒

k, x = map(int, input().split())
# x-(k-1) ~ x+(k-1)
print(' '.join(map(str, range(x-k+1, x+k))))

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    k, x = list(map(int, input().rstrip('\n').split()))
    print(*([i for i in range(x - k + 1, x + k)]))


if __name__ == '__main__':
    slove()

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(*list(range(X-(K-1), X+(K-1)+1)))

Submission status: Accepted

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

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

print(' '.join(map(str, 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(" "))

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

Submission status: Accepted

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

Submission status: Accepted

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

l = []
a = x - (k-1)
for _ in range(k*2 - 1):
    l.append(a)
    a += 1
    
print(*l)

Submission status: Accepted

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

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())
min_i = x - k + 1
max_i = x + k - 1
min_i = max(min_i, -1000000)
max_i = min(max_i,  1000000)
print(*range(min_i, max_i+1))

Submission status: Accepted

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

Submission status: Accepted

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

l = map(str, list(range(x - k + 1, x + k)))

print(' '.join(l))

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 = (int(x) for x in input().split())
start = max(X - K + 1, -1000000)
end = min(X + K - 1, 1000000)
for i in range(start, end + 1):
    print(i, end=' ')
print('\n')

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:
k, x = map(int, input().split())
if k > 1:
    print (*([p for p in range(x-k+1,x+1)] + [p for p in range(x+1, x+k)]))
else:
    print (x)

Submission status: Accepted

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

i=-1*k+1

ans=[] #空のリストを作成

for i in range (-1*k+1,k):
    #print(x+i)
    ans.append(x+i)
    i=i+1
#リストの中身はfor文内ではint型（計算のため）

ans_str = [str(n) for n in ans]
#リストの中身を文字列に換える
wer=' '.join(ans_str)
#空白文字で連結
print(wer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=input().split()
K=int(K)
X=int(X)
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())

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

print(*a)

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit
setrecursionlimit(10000000)

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

K,X =inpl()

i = X - (K-1)
j = X + K

ans =list()
for a in range(i,j):
    ans.append(str(a))

print(" ".join(ans))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
if x-k+1<-1000000:
  ans1=-1000000
else:
  ans1=x-k+1
if x+k-1>1000000:
  ans2=1000000
else:
  ans2=x+k-1
while ans1<ans2:
  print(ans1,end=' ')
  ans1+=1
print(ans2)

Submission status: Accepted

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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq

# decimal.getcontext().prec = 50
# sys.setrecursionlimit(10000)
# MOD = 10**9 + 7

def solve(f):
    k, x = f.read_int_list()

    return " ".join(map(str, range(x-k+1, x+k)))


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case #%d\n"%f.case, solve(f)
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
ANS= list(range(X-(K-1),X)) + list(range(X, X+K))
print(' '.join([str(i) for i in 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:
K,X=map(int,input().split())
list=[]
for i in range((2*K)-1):
	list.append(X-(K-1)+i)
print(*list)

Submission status: Accepted

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

l = list(range(max(-1000000, X-K+1), min(X+K, 1000000)))

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

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(max(-1000000,X-K+1),min(1000000,X+K-1)+1):
    print(i)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import *
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    print(max(a + b, a - b, a * b))
    return

#B
def B():
    k, x = LI()
    ans = []
    for i in range(x - k + 1, x + k):
        ans.append(i)
    print(*ans)
    return

#C
def C():
    n = II()
    d = defaultdict(int)
    for _ in range(n):
        s = S()
        s.sort()
        d[tuple(s)] += 1
    ans = 0
    for i in d.values():
        ans += i * (i - 1) // 2
    print(ans)
    return

#D
def D():
    n, m = LI()
    ab = LIR(n)
    ab.sort(key=lambda x: (x[1], x[0]), reverse=True)
    ans = 0
    for i in range(n):
        if m >= ab[i][0]:
            ans += ab[i][1]
            m -= 1
    print(ans)
    return

#E
def E():
    return

#F
def F():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Accepted

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

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

ans.sort()
print(*ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
data = []
data.append(X)
for i in range(1, K):
    num1 = X - i
    num2 = X + i
    if (num1 < -10000) and (num2 > 10000):
        break
    elif (num1 < -10000):
        data.append(num2)
    elif (num2 > 10000):
        data.append(num1)
    else:
        data.append(num1)
        data.append(num2)

sort_data = sorted(data)
print(' '.join(map(str,  sort_data)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc137B - One Clue
K, X = list(map(int,input().split()))
left = max(-1000000,X-K+1)
right = min(1000000,X+K-1)
for i in range(left,right+1,1):
    print(i,end=" ")

Submission status: Accepted

Solution code:
# abc137B - One Clue
K, X = list(map(int,input().split()))
left = max(-1000000,X-K+1)
right = min(1000000,X+K-1)
ans = [str(i) for i in range(left,right+1,1)]
print(' '.join(ans))

Submission status: Accepted

Solution code:
# abc137B - One Clue
K, X = list(map(int,input().split()))
left = max(-1000000,X-K+1)
right = min(1000000,X+K-1)
if left == right:
    print(left)
else:
    ans = [str(i) for i in range(left,right+1,1)]
    print(' '.join(ans))

Submission status: Accepted

Solution code:
# abc137B - One Clue
K, X = list(map(int,input().split()))
left = max(-1000000,X-K+1)
right = min(1000000,X+K-1)
if left == right:
    print(left)
else:
    for i in range(left,right+1,1):
        print(i,end=" ")

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

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

Submission status: Accepted

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

print(" ".join([str(i) for i in range(left, right)]))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
k = K - 1
if X - k < -1000000:
    result = range(-1000000, -1000000+K)
elif X + k > 1000000:
    result = range(1000000-k, 1000001)
else:
    result = range(X-k, X+K)
for i in result:
    print(str(i) + ' ', end='')

Submission status: Accepted

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

list_a =[]

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

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

Submission status: Accepted

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

for i in range(2*K-1):
    ans = X - K + 1 + i
    if  ans <= 10**6 and -10**6 <= ans:
        print(ans,end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K_X = list(map(int, input().split()))
min_cordinate = K_X[1]-(K_X[0]-1)
max_cordinate = K_X[1]+(K_X[0]-1)
if min_cordinate < -1000000:
    min_cordinate = -1000000
if max_cordinate > 1000000:
    max_cordinate = 1000000

N = (max_cordinate - min_cordinate) + 1
cordinateList = [min_cordinate]
s = ''

for i in range(N-1):
    cordinateList.append(cordinateList[-1] + 1)

for i in range(len(cordinateList)):
    s += ' ' + str(cordinateList[i])
print(s.lstrip(' '))

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,Y = list(map(int,input().split()))
l = []
for i in range(Y - K,Y + K - 1):
	print(i+1, end = ' ')
print()

Submission status: Accepted

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

min_n = (x - k + 1)
max_n = (x + k - 1)

print(" ".join(map(str,range(min_n, max_n + 1))))

Submission status: Accepted

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

possible = []

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k, x = map(int, open(0).read().split())

    min_black = max(-1000000, x - (k - 1))
    max_black = min(1000000, x + (k - 1))
    ans = range(min_black, max_black + 1)
    print(*ans)
    return()

if __name__ == '__main__':
    main()

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

li = []
for i in range(x-k+1,x+k):
    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):
  if(i != X+K-1): A += str(i) +' '
  else: A += str(i)
print(A)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,x = map(int,input().split()) # k個の石　x座標

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

lists = list(range(min_x,max_x))
print(" ".join(map(str, lists)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


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

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    solve(K, X)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


def solve(K: int, X: int):
    result = set()
    point = X - K
    for start in range(1, K + 1):
        base = [i for i in range(start, start + K)]
        arr = np.array(base) + point
        for element in arr:
            result.add(element)

    result = sorted(result)
    result = map(str, result)
    result = " ".join(result)

    print(result)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    solve(K, X)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
number_list = list(range(B-(A-1),B+A))
print(*number_list)

Submission status: Accepted

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

start = x - k + 1
start = -1000000 if start < -1000000 else start
stop = x + k
stop = 1000000 if stop > 1000000 else stop

for i in range(start, stop):
    print(i, end=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=sys.stdin.readline
def resolve():
    k,x=map(int,input().split())
    print(*range(x-k+1,x+k))
resolve()

Submission status: Accepted

Solution code:
L = list(map(int, input().split()))
R,O = L[0],L[1]
 
S = O + (R-1)
I = O - (R-1)
 
L = [i for i in range(I,S+1) if i <= 100000 and i >= -100000]
if len(L) == 0:
  print(O[0])

for i in L:
	print(i)

Submission status: Accepted

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

L = 1000000
m = max(-L, X-(K-1))
M = min(L, X+(K-1))

print(*list(range(m,M+1)))

Submission status: Accepted

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