Problem:


Score : 200 points

Problem Statement

There are 2000001 stones placed on a number line. The coordinates of these stones are -1000000, -999999, -999998, \ldots, 999999, 1000000.

Among them, some K consecutive stones are painted black, and the others are painted white.

Additionally, we know that the stone at coordinate X is painted black.

Print all coordinates that potentially contain a stone painted black, in ascending order.

Constraints

1 \leq K \leq 100

0 \leq X \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

K X

Output

Print all coordinates that potentially contain a stone painted black, in ascending order, with spaces in between.

Sample Input 1

3 7

Sample Output 1

5 6 7 8 9

We know that there are three stones painted black, and the stone at coordinate 7 is painted black. There are three possible cases:

The three stones painted black are placed at coordinates 5, 6, and 7.

The three stones painted black are placed at coordinates 6, 7, and 8.

The three stones painted black are placed at coordinates 7, 8, and 9.

Thus, five coordinates potentially contain a stone painted black: 5, 6, 7, 8, and 9.

Sample Input 2

4 0

Sample Output 2

-3 -2 -1 0 1 2 3

Negative coordinates can also contain a stone painted black.

Sample Input 3

1 100

Sample Output 3

100



Sample input:
3 7


Sample output:
5 6 7 8 9

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
l = (K-1)*2 + 1
start = X - (K-1)
outlist = list(range(start,start+l))
print(" ".join(map(str,outlist)))

Submission status: Accepted

Solution code:
# stdin
INPUT_SENTENCES = 1
ss = [input() for i in range(INPUT_SENTENCES)][0].split()
K = int(ss[0])
X = int(ss[1])
# around X
black_min = X - K
black_max = X + K
print(' '.join([str(i) for i in range(black_min+1, black_max)]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
TOTAL = 2000001

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

r = k - 1

p1 = x - r
p2 = x + r + 1

res = ''

for i in range(p1, p2):
    res =  res + str(i) + " "

print('{}'.format(res))

Submission status: Accepted

Solution code:
from collections import deque

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

ans = deque()

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

anstext = ''
for i in ans:
    anstext += '{}'.format(i) + ' '

print(anstext[:-1])

Submission status: Accepted

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

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:
from functools import reduce

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

RF = X - K + 1
RL = X + K - 1

print(' '.join([str(n) for n in range(RF, RL + 1)]))

Submission status: Accepted

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

for i in range(max-min+1):
  print(i+min)

Submission status: Accepted

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

a-=1

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

Submission status: Accepted

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

ans = list(range(min_num,max_num))
print(*ans)

Submission status: Accepted

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

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

ans = list(range(left,right+1))
ans = map(str, ans)

print(' '.join(ans))

Submission status: Accepted

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

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

print(' '.join(result))

Submission status: Accepted

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


def solve(K: int, X: int):
    output = ''
    for i in range(X - K + 1, X + K):
        output += str(i) + ' '
    print(output[:-1])
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
k, x = map(int, input().split())
a = range(x-k+1, x+k)
print(" ".join(map(str, a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

k, x = input().split()

k = int(k)
x = int(x)

upper = 0
lower = 0

if x - k < -1000000:
    lower = -1000000
    upper = x + k
elif x + k > 1000000:
    upper = 1000000
    lower = x - k
else:
    upper = x + k
    lower = x - k

ans = ""
for num in range(lower + 1, upper):
    ans = ans + " " + str(num)

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())
L1 = list(range(X-K+1,X+K))
L1_str = [str(n) for n in L1]
L2 = ' '.join(L1_str)
print(L2)

Submission status: Accepted

Solution code:
def solve(k, x):
    res = []
    for i in range(2*k-1):
        y = x-k+1+i
        if -1000000 <= y <= 1000000:
            res.append(y)
    return " ".join(map(str, res))

k, x = map(int, input().split())
print(solve(k, 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:
a = list(map(int,input().split()))

k = a[0]
x = a[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

while A <= X+K-1:
  print(A,end=' ')
  A+=1

Submission status: Accepted

Solution code:
input_num=input().split()# 2 4のような入力
input_num=[int(num) for num in input_num]#intへ変換

K=input_num[0]#連続する数
X=input_num[1]#確実に黒い

min_cons=-10**6
max_cons=10**6

max_num=X+K-1
min_num=X-(K-1)

if min_num<min_cons:
    min_num=min_cons

if max_num>max_cons:
    max_num=max_cons

num_list=[i for i in range(min_num,max_num+1)]
print(*num_list)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split(" ")))
#範囲は座標に制限がなければa[1]-a[0]+1~a[1]+a[0]-1
if a[1]-a[0]+1<-10000:
  if a[1]+a[0]-1>10000:
    b=[i for i in range(-10000,10001)]
  else:
    b=[i for i in range(-10000,a[1]+a[0])]
else:
  b=[i for i in range(a[1]-a[0]+1,a[1]+a[0])]
for i in b:
  print(i,end=" ")

Submission status: Accepted

Solution code:
def main(K, X):
    num_list = [x for x in range(-1000000,1000001,1)]
    if 100 >= K >= 1 and 100 >= X >= 0:
        range_k = [j for j in range(X-K+1, X+K,1)]
    for j in range(len(range_k)):
        print(range_k[j], end=' ')

if __name__ == '__main__':
    s = list(map(int, input().split()))
    main(s[0], s[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import bisect
import collections
import itertools


def getint(): return int(input())
def getints(): return list(map(int, input().split()))
def getint2d(rows): return [getints() for _ in range(rows)]
def getgrid(rows): return [input() for _ in range(rows)]
def array1d(n, value): return [value for _ in range(n)]
def array2d(n, m, value): return [array1d(m, value) for _ in range(n)]

k,x=getints()

min_value = max(x - k + 1, -1000000)
max_value = min(x + k - 1,  1000000)

for i in range(min_value, max_value + 1):
    print(i, end=" ")
print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from itertools import accumulate


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

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

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

import os
#n = int(input())
k,x = map(int, input().split())
l_i =[]

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

print(*l_i)

Submission status: Accepted

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

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

print(*array)

Submission status: Accepted

Solution code:
k,x=map(int,input().split())
for x in range(max(-10**6,x-k+1),min(x+k-1,10**6)+1):
  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=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
ans = []
l = k-1
for i in range(k*2-1):
    if (x-l <= 1000000) and (x-l >= -1000000):
        ans.append(x-l)
    l -= 1

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

num_min = max(-1000000, x-k+1)
num_max = min(1000000, x+k-1)

for i in range(num_min, num_max+1):
    print("{} ".format(i), end="")

Submission status: Accepted

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

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

Submission status: Accepted

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

print(*range(b - (a - 1), b + (a - 1) + 1))

Submission status: Accepted

Solution code:
K,X = map(int,input().split())
#X-(K-1)からX+(K-1)までを出力
for i in range(2*K-1):
    if i == 2*K-2:
        print(X-(K-1)+i)
    else:
        print(X-(K-1)+i, end=' ')

Submission status: Accepted

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

t=[0]*(2*k-1)

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

Submission status: Accepted

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

L = - (10 ** 6)
H = 10 ** 6

ans_L = max(L, x - k + 1)
ans_H = min(H, x + k - 1)

ans = []
for i in range(ans_L, ans_H + 1):
    ans.append(str(i))

print(' '.join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
pos_list = list(range(x - k + 1, x + k))
pos_list = [x for x in pos_list if x > -1000000 and x < 1000000]
pos_list.sort()
for i in pos_list:
  print('{}'.format(i), sep='', end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 富士山八合目の山小屋から
# 今回は風が強すぎて山頂を目指せませんでしたがまた挑戦したいですね
# Aをやったけど余裕があったのでBも…
# https://atcoder.jp/contests/abc137/submissions/6891685

k, x = map(int, input().split())
i = x - k + 1
cnt = 1
while cnt < k*2:
    print(i, end=" ")
    cnt += 1
    i += 1

Submission status: Accepted

Solution code:
N,place=map(int,input().split())
#place-N+1~place+N-1を出力すればいい
for x in range(place-N+1,place+N):
  print(x,end=' ')

Submission status: Accepted

Solution code:
k,x = map(int,input().split())
if k==1:
  print(x)
else:
  list_ = list(range(max(-1000000,x-(k-1)),min(1000000,x+(k-1))+1))
  list_=[str(i) for i in list_]
  answer = " ".join(list_)
  print(answer)

Submission status: Accepted

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

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

print(*result)

Submission status: Accepted

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

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

output = [str(i) for i in range(X - (K - 1),X + K)]

print(' '.join(output))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split());q=max(-1000000,b-a+1);w=min(1000000,b+a-1);A=[i for i in range(q,w+1)]
for i in range(len(A)):
  print(A[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(x+k-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

for val in range(r):
	print(val+min)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
K, X = map(int, input().split())
ans=""
for i in range(X-K+1, X+K):
  ans += "{} ".format(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=" ")

Submission status: Accepted

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

mi = max(-1000000,x-k+1)
ma = min(1000000,x+k-1)

for i in range(mi,ma+1):
    print(i,end = ' ')

Submission status: Accepted

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

aa = []

for i in range(X-K+1, X+K):
    aa.append(i)
    
print(*aa)

Submission status: Accepted

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

max = X + K - 1
min = X - K + 1

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

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kx = [int(i) for i in input().split()]
k,x = kx[0],kx[1]
c = k*2 - 1
g = [j + x - k + 1 for j in range(c)]
ss = ""
for s in g:
	ss += str(s) + " "
print(ss.strip())

Submission status: Accepted

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

A = x-k+1
B = x+k-1

while A != B+1:
    print(A, end=' ')
    A = A + 1

Submission status: Accepted

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

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


start = x - k + 1
for i in range(2*k - 1):
    if -1000001 < start+i < 1000001:
        print(start + i)

Submission status: Accepted

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

for i in range(2*k-1):
    if 1000001 > x+i-k+1 > -1000001:
        print(x+i-k+1, end = " ")
    else:
        continue

Submission status: Accepted

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

def solve():
    K, X = list(map(int, input().split()))
    left = X - (K-1)
    right = X + (K-1)

    s = ""
    for i in range(left, right+1):
        s += "{} ".format(i)
    print(s[:-1])


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

k = il[0]
x = il[1]

minusLimit = x - k + 1
plusLimit = x + k - 1

i = minusLimit

s = ""

while minusLimit <= i <= plusLimit :
  s =  s + str(i) + " "
  i = i + 1
s[:-1]
print(s)

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=' ')
print('')

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
import bisect
input = sys.stdin.readline
 
def main():
    x,y = map(int,input().split())
    
    print(" ".join(map(str, list(range(y - x + 1, x + y)))))
    
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='')

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    K = list(map(int,input().split()))
    X = K[1]
    K = K[0]
    maxX = (X + (K-1))
    minX = (X - (K-1))
    if maxX > 1000000:
        maxX = 1000000
    elif minX < -1000000:
        minX = -1000000
    for i in range(maxX - minX + 1):
        print(minX + i, end = " ")

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:
num_int = list(map(int, input().split()))
K = num_int[0]
X = num_int[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve(string):
    k, x = map(int, string.split())
    return " ".join(list(map(str, range(x - k + 1, x + k))))


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def stones(input):
    k, x = map(int, input.split())
    if k is 1:
        print(x)
        return x
    j = [i for i in range(x - k + 1, x + k)]
    s = ' '.join(map(str, j))
    print(s)
    return
 
 
stones(input())

Submission status: Accepted

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

low = X - K
hight = X + K

a = []
for x in range(low + 1, hight, 1):
    a.append(str(x))
print(' '.join(a))

Submission status: Accepted

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

low = X - K
hight = X + K

a = set()
for x in range(low + 1, hight, 1):
    a.add(x)
a = sorted(a)
a = [str(x) for x in a]
print(' '.join(a))

Submission status: Accepted

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

low = X - K
hight = X + K

a = set()
for x in range(low + 1, hight, 1):
    a.add(x)
print(' '.join([str(x) for x in sorted(a)]))

Submission status: Accepted

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

low = X - K
hight = X + K

a = set()
for x in range(low + 1, hight, 1):
    a.add(x)
a = sorted(a)
b = [str(x) for x in a]
print(' '.join(b))

Submission status: Accepted

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


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

kotae = [str(i) for i in range(hajime,owari+1)] #x,yは任意の数字
print(" ".join(kotae))

Submission status: Accepted

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

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 = [int(_) for _ in 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())
lower = X-(K-1) if X-(K-1)>-1000001 else -1000000
upper = X+(K-1) if X+(K-1)<1000001 else 1000000
result=""
for i in range(lower,upper+1):
    result = result+str(i)+" "
print(result[:-1])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X = map(int, input().split())
ans = list(range(X-K+1,X+K))
aa = ans.copy()
for a in aa:
    if  -10**6 > a or 10**6 < a:
        ans.remove(a)

print(*ans)

Submission status: Accepted

Solution code:
import math, heapq
INF = float("inf")
MOD = int(1e9 + 7)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
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())
print(' '.join([str(i) for i in range(max(-1000000, x-k+1), min(1000001, x+k))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K, X = [int(x) for x in input().split(' ')]

xmin = max(-1000000, X - K)
xmax = min(1000000,  X + K)

l = [str(x) for x in range(xmin+1, xmax)]
L = " ".join(l)
print(L)

Submission status: Accepted

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

if X + K - 1 > MAX:
    X -= X + K - MAX - 1

print(' '.join(map(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(max(-1000000, x-k+1), min(x+k-1, 1000000)+1):
  print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
import atexit
import io
import heapq
from collections import defaultdict, Counter
MOD = int(1e9+7)



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

main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)
input=sys.stdin.readline
def intinput():return map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

#num_line = [i for i in range(-1000000, 1000001)] 
answer = []

if X-K< -1000000:
    answer = [i for i in range(-1000000,X+K+1)]
elif X+K>1000000:
    answer = [i for i in range(X-K+1,1000000)]
else:
    answer = [i for i in range(X-K+1,X+K)]

for i in range(len(answer)):
    print("{} ". format(answer[i]))

Submission status: Accepted

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

bound = 1000000

upper = min(X + K - 1, bound)
lower = max(X - K + 1, -bound)
res = map(str, range(lower, upper + 1))
print(' '.join(res))

Submission status: Accepted

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

min = X - K + 1
max = X + K

for i in range(min, max):
    print("{} ".format(i))

Submission status: Accepted

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

blacks = {}
blacks[X] = True
for i in range(K):
    if -1000000 <= i and i <= 1000000:
        blacks[X - i] = True
        blacks[X + i] = True

blacks_list = list(blacks.keys())
print(' '.join([str(x) for x in sorted(blacks_list)]))

Submission status: Accepted

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

min = X - K + 1
max = X + K 

for i in range(min , max ):
    print("{} ". format(i))

Submission status: Accepted

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

Submission status: Accepted

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

L = []
for i in range(-1000000,1000001):
    if i <= X+K-1 and X-K+1 <= i:
        L.append(i)
print(*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())

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

print(' '.join(ans))

Submission status: Accepted

Solution code:
K, X = [int(i) for i in input().split()]
s = set()
for i in range(K):
    s.add(X+i)
    s.add(X-i)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

maxa=x+(k-1)
mina=x-(k-1)

if maxa>1000000:
  maxa=1000000
if mina<-1000000:
  mina=-1000000

a=[]
for i in range(mina,maxa+1):
  a.append(i)
  
for i in range(len(a)):
  print(a[i],end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K, X = map(int, input().split())
ans = list()
for i in range(-1000000, 1000001):
  if abs(i-X)<=K-1:
    ans.append(i)
print(*ans, sep=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if __name__ == '__main__':
    k, x = map(int, input().split())
    one_clue(k, x)

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

num = end - start + 1 

anserLsit = []
for i in range(num):
  print(start+i)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

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

Submission status: Accepted

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

Submission status: Accepted

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

r = list(range(x-k+1, x+k))
ans = ''
for i in r:
  if i != x+k-1:
    ans = ans + str(i) + ' '
  else:
    ans = ans + str(i)

print(ans)