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 = [int(x) for x in 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())

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

Submission status: Accepted

Solution code:
N, M = list(map(int, input().split()))
s = max([M - N + 1, -1000000])
e = min([M + N - 1, 1000000])
print(" ".join([str(i) for i in range(s, e+1)]))

Submission status: Accepted

Solution code:
[K,X] = list(map(int,input().split()))
mi = max(-1000000,X-K+1)
ma = min(1000000,X+K-1)
output = ""
for i in range(mi, ma):
    output += "{} ".format(i)
output += "{}".format(ma)
print(output)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if left < -MAX:
    left = -MAX
    right = -MAX + (K-1)
elif right > MAX:
    right = MAX
    left = MAX - (K-1)

ret = range(left, right+1)
print(*ret)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

xmin = x - k + 1
xmax = x + k - 1

values = list(range(xmin, xmax + 1))
print(' '.join(map(str, values)))

Submission status: Accepted

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


def get_num():
    return int(input())


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


def get_numbers():
    return map(int, input().split())


k, x = get_numbers()

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

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())
print(*list(range(max(-1e6,x-k+1),min(1e6,x+k-1)+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())
ans = []
for i in range(X-K+1, X+K):
    ans.append(i)
print(*ans)

Submission status: Accepted

Solution code:
import sys


def solve(K: int, X: int):
    s = X - (K - 1)
    e = X + (K - 1)
    ans = []
    for i in range(2000001):
        x = i - 1000000
        if s <= x <= e:
            ans.append(str(x))
    return " ".join(ans)
        


# -----------------------------------------------------------------------------
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

    ans = solve(K, X)
    if ans is not None:
        print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

t = [0] * (K * 2 - 1)
for i in range(K * 2 - 1):
    t[i] = X - K + 1 + i
print(" ".join(map(str, t)))

Submission status: Accepted

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

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

ans = ans.rstrip()
print(ans)

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
minN = max(-1000000, x-k+1)
maxN = min(1000000, x+k-1)
answer = str(minN)
index=minN+1
while index < maxN+1:
    answer+=" "
    answer+=str(index)
    index+=1
print(answer)

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:
K, X = map(int, input().split())
a = max(X - K + 1, -1000000)
b = min(X + K - 1, 1000000)
result = []
for i in range(a, b + 1):
    result.append(str(i))
print(" ".join(result))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(" ".join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


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


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(K, X):
    ans = []
    for i in range(X-K+1, X+K):
        ans.append(i)
    return ' '.join(map(str, ans))


def main():
    K, X = read_int_n()
    print(slv(K, X))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

def solve():
  k,x = (int(i) for i in input().split())
  query = []
  for i in range(k):
    query.append(x-i)
  for i in range(k-1):
    query.append(x+i+1)
  query.sort()
  print(*query)
solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

K,X = map(int,input().split())
ans = []

for i in range(2* (10**6)+1):

    i -= 10**6

    if abs(X-i) < K:

        ans.append(str(i))

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)
ans = []
for i in range(l, r+1):
    ans.append(i)
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    K, X = InputToInt()
    for i in range(2*K-1):
        print(X-K+i+1, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

MIN, MAX = -1000000, 1000000

min_ = max(MIN, X - K + 1)
max_ = min(MAX, X + K - 1)
print(" ".join(str(n) for n in range(min_, max_ + 1)))

Submission status: Accepted

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


def main():
    k, x = (int(z) for z in input().split())
    left = x - (k - 1)
    right = x + (k - 1)
    print(*range(left, right + 1))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys
import math

sys.setrecursionlimit(100000)

MIN = -10 ** 9
MAX = 10 ** 9 + 7


def main():
    # N = int(input())
    K, X = [int(a) for a in input().split()]
    # H = [
    #     int(input())
    #     for _ in range(N)
    # ]
    # A = [int(a) for a in input().split()]
    m = max(-1000000, X - K + 1)
    m2 = min(1000000, X + K - 1)
    print(*range(m,m2+1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline
def main():
    k, x = map( int, input().split())
    ANS = []
    for i in range(1,k):
        ANS.append(x-k+i)
    ANS.append(x)
    for i in range(1,k):
        ANS.append(x+i)
    print(" ".join( map( str, ANS)))
if __name__ == '__main__':
    main()

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:
import numpy as np
from collections import defaultdict
from functools import reduce

# s = input()
# n = int(input())
# A = list(map(int, input().split()))
K, X = map(int, input().split())

res = []
for x in range(X-K+1, X+K):
    if x < -100000 or x > 1000000:
        continue
    res.append(x)

print(*res)

Submission status: Accepted

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

Submission status: Accepted

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


for item in s1:
    print(item, end = ' ')
for item in s2:
    print(item, end = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

#2000001
#-1000000

results = []
for i in range(X - K + 1, X + K):
    if -1000000 <= i <= 1000000:
        results.append(str(i))
print(' '.join(results))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if 1000000 < tail:
    tail = 1000000

if head < -1000000:
    head = -1000000

i = head
while i <= tail:
    print(i)
    i+=1

Submission status: Accepted

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


print(*ans)

Submission status: Accepted

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

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

print(X, end=" ")

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

Submission status: Accepted

Solution code:
import sys, math
from collections import deque

readline = sys.stdin.readline

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

a = [i for i in range(max(-1000000, X - K + 1), min(1000000, X + K - 1) + 1)]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# N = int(input())
# n, *a = map(int, open(0))
K, X = map(int, input().split())

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

Submission status: Accepted

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

left = max(K-N+1, -1000000)
right = min(K+N-1, 1000000)

l = list(range(left, right+1))
print(*l)

Submission status: Accepted

Solution code:
import sys, math, itertools, bisect, copy, re
from collections import Counter, deque, defaultdict

# from itertools import accumulate, permutations, combinations, takewhile, compress, cycle
# from functools import reduce
# from math import ceil, floor, log10, log2, factorial
# from pprint import pprint

INF = float('inf')
MOD = 10 ** 9 + 7
EPS = 10 ** -7
sys.setrecursionlimit(1000000)

# N = int(input())
# N,M = [int(x) for x in input().split()]
# V = [[0] * 100 for _ in range(100)]
# A = [int(input()) for _ in range(N)]
# DP = [[0] * 100 for _ in range(100)]
# DP = defaultdict(lambda: float('inf'))


K, X = [int(x) for x in input().split()]

mi = max(-1000000, X - (K - 1))
ma = min(1000000, X + (K - 1))
R = list(range(mi,ma+1))
print(" ".join([str(x) for x in R]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC137b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

min_x = x-k
max_x = x+k
print(*list(range(min_x+1,max_x,1)))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

ans = ""
for i in range(start, end+1):
    ans += str(i) + " "

print(ans)

Submission status: Accepted

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

st = max(-10**6, x-k+1)
en = min(10**6, x+k-1)

ANS =[str(i) for i in range(st, en+1)]
print(" ".join(ANS))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

k,x = get_nums_l()

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

Submission status: Accepted

Solution code:
k, x = list(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:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

k, x = li()

ans = [i for i in range(max(-10**6, x-k+1), min(10**6, x+k-1)+1)]
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = []

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

first = X - K + 1
end = X + K - 1

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

Submission status: Accepted

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

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:
#!/usr/bin/env pypy
from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


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


# region fastio

BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

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,end = " ")

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)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter

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

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import sys
import collections
import copy
import math
input = sys.stdin.readline
K, X = map(int, input().split())
sta = X-K+1
ans = []
for i in range(2*K-1):
    ans.append(sta)
    sta += 1
print(*ans)

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:
n,k=map(int,input().split())
for i in range(n):
    print(k-n+i+1,end=' ')
for i in range(n-1):
    if i==n-1:
        print(k+i+1)
    else:
        print(k+i+1,end=' ')

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:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = ""
k,x = (int(num) for num in input().split())
for n in range(-1000000,1000001):
    if n >= x-k+1 and n <= x+k-1:
        ans += str(n) + " "
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def perr(s): return print(s, file=sys.stderr)
def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('- {} -> {}'.format(name, val), file=sys.stderr)
            return None

K, X = LI()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7

# N = int(input())
# S = input()
K, X = map(int, input().split())
# 横
# L = [int(x) for x in input().split()]
# 縦
# A = [int(input()) for _ in range(N)]
# 多次元
# L = [[int(x) for x in input().split()] for _ in range(N)]

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

print()

Submission status: Accepted

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

res_min = max(-100000, X - K + 1)
res_max = min(100000, X + K - 1)

print(" ".join([str(i) for i in range(res_min, res_max + 1)]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

K,X = II()

left = max(-1000000,X-K+1)
right = min(1000000,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())

ar = []
v = x-k+1
while v <= x+k-1:
    ar.append(v)
    v += 1
print(' '.join(map(str, ar)))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k, x = map(int, input().split())
print(*range(x - k + 1, x + k))

Submission status: Accepted

Solution code:
K, X = [int(i) for i 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())
ans = range(x-k+1, x+k)
print(" ".join(list(map(str, ans))))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

Solution code:

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

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