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())
t1=X-K+1
t2=X+K
for x in range(t1,t2):
  print(x,end="")
  if x != t2-1:
    print(" ",end="")
  else:
    print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

K,X = MI()

print(*[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):
    if -1000000<=i and i<=1000000:
        print(i)

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())
ans=list()
init=X-(K-1)
for i in range(2*K-1):
    ans.append(init)
    init+=1
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    n_min = X - K + 1
    n_max = X + K - 1

    ans = list(range(n_min, n_max+1))
    print(' '.join(str(n) for n in ans))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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

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

s = ''
for i in l:
    s += i
    s += ' '
print(s)

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

Submission status: Accepted

Solution code:
def main():
    K, X = map(int, input().split())
    if K == 1:
        print(X)
        return
    ans = []
    ans.append(X)
    l = X
    r = X
    for i in range(K - 1):
        l = l - 1
        r = r + 1
        ans.append(l)
        ans.append(r)
    ans.sort()
    a = ''
    for i in range(len(ans)):
        a = a + str(ans[i]) + ' '
    print(a)
main()

Submission status: Accepted

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


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

print(*l)

Submission status: Accepted

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

a = []

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



print(*a)

Submission status: Accepted

Solution code:
import sys


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


def main():
    K, X =map(int,input().split())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

if not ( 1 <= K <= 100 and 0 <= X <= 100 ): sys.exit()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC137 B - One Clue

K,L = map(int,input().split())
T = []
for i in range(K):
    T.append(L-i)
for i in range(K):
    T.append(L+i)
    
T = list(set(T))

list.sort(T, reverse=False)
print(*T)

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

Submission status: Accepted

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

ans=""

for L in l:
  s=str('{} '.format(L))
  ans+=s

print(ans)

Submission status: Accepted

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

l = [x - i for i in range(1, k)] + [x + i for i in range(k)]
l.sort()
ans = ''
for n in l:
  ans += str(n) + ' '

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

left = X - K + 1
right = X + K - 1
ans = []

for i in range(left, right+1):
    ans.append(i)

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

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())
left = max(-1000000, x-k+1)
right = min(1000000, k+x-1)
if k == 1:
    print(x)
else:
    print(' '.join(list(map(str, list(range(left, right+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())
print(*[x for x in range(X-K+1,X+K)])

Submission status: Accepted

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

Submission status: Accepted

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

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:
l = [int(x) for x in input().split()]
k, x = l[0], l[1]
a = max(-1000000, x - k + 1)
b = min(1000000, x + k - 1)
for x in range(a, b + 1):
  print(x, end=" ")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
a=X-K+1
b=X+K
while a<b:
  print(a,end=" ")
  a+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
k, x = map(int,input().split())
f = max(-1000000, x-k+1)
t = min(1000000, x+k-1)
a = np.arange(f, t+1).tolist()
a = [str(i) for i in a]
print(' '.join(a))

Submission status: Accepted

Solution code:
def resolve():
    K, X = list(map(int, input().split()))
    print(*list(range(-1000000, 1000001, 1))[X-K+1000000+1:X+K+1000000])

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    k,x=map(int,input().split())
    ans=list(range(max(-10**6,x-k+1),min(10**6,x+k-1)+1))
    print(*ans,sep=' ')

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

K, X = rl()

print(*list(range(X-K+1, X+K-1+1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
print(*list(range(b-a+1,b+a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
S = []
for i in 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))
print(*ans, sep=' ')

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

# import fractions

sys.setrecursionlimit(10000000)

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

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

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

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


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

    K, X = il()
    print(*range(X-K+1, X+K))


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.append(i)
print(*ans)

Submission status: Accepted

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

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

ans.sort()
print(*ans)

Submission status: Accepted

Solution code:
#create date: 2020-07-03 18:05

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    k, x = na()
    amin, amax = x-k+1, x+k-1
    print(*list(range(amin, amax+1)))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
dif = k - 1
if dif == 0:
    print(x)
else:
    mini = x - dif
    maxi = x + dif
    a = []
    for i in range(mini, maxi + 1):
        a.append(str(i))
    s = ' '.join(a)
    print(s)

Submission status: Accepted

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

mn = X - K + 1
if mn < - 1000000:
  mn = -1000000
mx = X + K -1
if mx > 1000000:
  mx = 1000000
for i in range(mn, mx+1):
  print(i)

Submission status: Accepted

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

Submission status: Accepted

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

ls1=range(k+(k-1))
ls2=[n+(x-(k-1)) for n in ls1]
print(*ls2)

Submission status: Accepted

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

Submission status: Accepted

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

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

for j in range(k):
  r.append(x+j)
  
print(*r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k, x = map(int, input().split())
print(*range(max(-1000000, x - k + 1), min(1000001, 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())
ans = [x]
for sign in [-1, 1]:
    for i in range(1, k):
        ans.append(x + sign*i)

ans.sort()
for i in range(len(ans)):
    print(ans[i], end=" ")

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if X+K-1 <= 1000000:
  right = X+K-1
else:
  right = 1000000
  
if X-K+1 >= -1000000:
  left = X-K+1
else:
  left = -1000000
  
ans = [i for i in range(left, right+1)]
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

min_X = X - K + 1
max_X = X + K - 1

ans = [i for i in range(min_X, max_X+1)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

    
if __name__ == "__main__":
    main()

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:
N, X=map(int, input().split())
ans=[]
for _ in range(X-N+1, X+N):
  ans.append(str(_))
print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(*lst)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    K, X = map(int, readline().split())

    ans = list(range(X - K + 1, X + K))
    print(*ans)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
k, x = M()
ans = list()
for i in range(1, k):
    ans.append(x-i)
ans.append(x)
for i in range(1, k):
    ans.append(x+i)
ans.sort()
print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

num = []
for i in range(min, max + 1):
    num.append(i)

print(*num)

Submission status: Accepted

Solution code:



def fun(n,num,count):

    if count == (num*2)-1:
        return
    print(n,end=" ")
    count +=1
    fun(n+1,num,count)
xnum=list(map(int,input().split()))
x=xnum[1]
num=xnum[0]

m=x-(num-1)

fun(m,num,0)

Submission status: Accepted

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

max_ = x + (k - 1)
min_ = x - (k - 1)

ans = list(range(min_, max_ + 1))
for i in ans:
    print(i, end = " ")

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
inp1,inp2=map(int,input().split())
list=[]
for inp2 in range(inp2-inp1+1,inp2+inp1):
               list.append(inp2)
print(*list)

Submission status: Accepted

Solution code:
# 137 B

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

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

Submission status: Accepted

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

Submission status: Accepted

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

list = []

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

print(*list)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a1=input()
res=[i for i in a1.split()]
K,X=[float(res[i]) for i in (0,1)]
k,x=K.is_integer(),X.is_integer()
if k and x == True and 1<=K<=100 and 0<=X<=100:
    K,X=int(K),int(X)
    a=X-K+1
    b=X+K-1
    if -1000000<=(a and b)<=1000000:
        for i in range(a,b+1):
            print(i,end=' ')

Submission status: Accepted

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

for i in range(k):
    output.append(str(x+i))
    output.append(" ")

output.pop()
print("".join(output))

Submission status: Accepted

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

Submission status: Accepted

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

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:
def main():
    k, x = map(int, input().split())
    a = list(range(x-k+1, x+k))
    print(*a)
    
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(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())
ans = []
for i in range(2*k-1):
    ans.append(x-k+1+i)
print(" ".join(map(str,ans)))

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


k, x = LI()
ans = []
stone = k - 1
if x - stone >= -(10 ** 6):
    ans += list(range(x - stone, x))
else:
    ans += abs(-(10 ** 6) - x)

ans += [x]

if x - stone <= (10 ** 6):
    ans += list(range(x + 1,  x + stone + 1))
else:
    ans += abs((10 ** 6) - x)
print(*ans)

Submission status: Accepted

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

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

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

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:
k, x = map(int, input().split())
MAX = 1000000
MIN = -1000000
res = list(range(max(x-k+1, MIN), x)) + list(range(x, min(x+k, MAX)))
print(" ".join(list(map(str, res))))

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
c=min(B+A-1,1000000)
d=max(B-A+1,-1000000)
print(" ".join(list(map(str,list(range(d,c+1))))))

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

Submission status: Accepted

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

Submission status: Accepted

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

min_index = X - K + 1
max_index = X + K

for i in range(min_index, max_index):
    print(i, end=" ")

Submission status: Accepted

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

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

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)
for i in range(len(l)):
  l[i] = str(l[i])
result = ' '.join(l)
print(result)

Submission status: Accepted

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

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())
ans = range(x-k+1,x+k)

print(*ans)

Submission status: Accepted

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

ans = range(x-k+1,x+k)
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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

a = max(-1000000,x - (k-1))
b = min(1000000,x+(k-1))

L = [str(i) for i in range(a,b+1)]
print(" ".join(L))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=''
for i in range(x-k+1,x+k):
  if abs(i)<=2000000:
    ans+=str(i)+' '
print(ans)