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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	K,X = inputMap()

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

	print(*ans)



if __name__ == "__main__":
	main()

Submission status: Accepted

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

L = X - K + 1
R = X + K - 1

for i in range(L,R):
    print(i,end=' ')

print(R)

Submission status: Accepted

Solution code:
k, x = map(int, input().split())
i = max(x - k + 1, -1000000)
c = 0
while (c < 2 * k - 1):
    print(i, end=' ')
    c += 1
    i += 1

Submission status: Accepted

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k,x=map(int,input().split(' '))
    ans = [i for i in range(x-k+1,x+k)]
    for i in ans:
        print(i,'',end="")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = ""

for n in range(X - K + 1, X + K):
  ans += " {}".format(n)
  
print(ans[1:])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import copy

#n = int(input())
k, x = [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for j in range(n)]
#table = [list(input()) for n in range(h)]
#s = [int(i) for i in input().split()]
#num = [int(i) for i in range(n)]
#s = [input() for i in range(n)]
#s = input()
#list = list(s)
#dp = [[0 for _ in range(2)] for _ in range(13)]

kotae = [0 for i in range(2*k-1)]

for i in range(0,2*k-1) :
    kotae[i] = x-k+1+i

print(*kotae)

Submission status: Accepted

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

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

print(" ".join(li))

Submission status: Accepted

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

T = X - K + 1

ans = []

for i in range(K*2 - 1):
    ans.append(T)
    T += 1

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter
import math
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    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(b"\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()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    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()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(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())
nums = []
for num in range(X-(K-1), X+K):
  nums.append(str(num))
print(' '.join(nums))

Submission status: Accepted

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

Min = max(X-K+1,-1000000)
Max = min(X+K-1,1000000)

Ans = [x for x in range(Min,Max+1)]

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

Submission status: Accepted

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

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

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

N = len(ans)
for i in range(N):
  print(ans[i], end = "")
  if i == N - 1:
    print()
  else:
    print(" ", end = "")

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

Solution code:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right

import re
# import numpy as np
# from scipy.misc import comb

# 再帰がやばいとき
# import sys
# sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 # 10^9 + 7

# field[H][W]
def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]

########

def main():
    K, X = l_inpl()
    ans = []
    print(" ".join([ str(i) for i in list(range(X-K+1, X+K))]))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(*ans)

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 numpy as np
import math
import copy
import re
import sys
#sys.exit(0)

inf = float("inf")
prime = 1

def check_print(check_flag, text, end="\n"):
  if check_flag:
    print(text, end=end)

def c2i(x):
    if str.isdecimal(x):
        return int(x)
    else:
        return x

def cout(*args):
  arglist = []
  for arg in args:
    if hasattr(arg, "__iter__"):
      arglist.extend(arg)
    else:
      arglist.append(arg)
      
  arglist = list(map(str, arglist))
  print(" ".join(arglist))
  
def count2(num):
  count=0
  while num%2==0:
    num/=2
    count+=1
  return count

def ketasum(num):
  nums = [int(s) for s in str(num)]
  return sum(nums)

#math
def gcd(a, b): #最大公約数
  while b:
    a, b = b, a % b
  return a

def lcm(a, b): #最小公倍数
  return a * b // gcd (a, b)

def gcd3(lis): #最大公約数(3over)
  ans = lis[0]
  for li in lis:
    ans = gcd(ans,li)

def lcm3(lis): #最小公倍数(3over)
  ans = lis[0]
  for li in lis:
    ans = lcm(ans,li)

def divisor(n): #nの約数を全て求める
  i = 1
  table = []
  while i * i <= n:
    if n%i == 0:
      table.append(i)
      table.append(n//i)
    i += 1
  table = list(set(table))
  return table

def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

def is_prime(n):
  for i in range(2, n + 1):
    if i * i > n:
      break
    if n % i == 0:
      return False
  return n != 1

#input stock
"""
n = int(input())

#list
a = map(int, input().split())
a,b = map(int, input().split())

d=[]
for i in range(n):
  d[i]=int(input())

#2dim-list
a = [list(map(int, input().split())) for i in range(n)]

s = input()
ss =  [int(si) for si in s]
"""

#processing stock
"""
a = sorted(a)
a = sorted(a, reverse=True)

"""

#regex
"""
pattern = ""
result = re.search(pattern, s)

result = re.fullmatch(pattern, s)

result = re.finditer(pattern, s)
for res in result:
    print res.group()   # 1回目: ca      2回目: ca   
    print res.start()   # 1回目: 0       2回目: 6      
    print res.end()     # 1回目: 2       2回目: 8      
    print res.span()    # 1回目: (0, 2)  2回目: (6, 8)
"""

#######################################
k,x = map(int, input().split())
ret = list(range(x-k+1,x+k))

cout(ret)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def main():
    K, X = [int(f) for f in input().split()]
    
    for row in range(X-K+1, X+K):
        print(row, end=" ")
    print("")

if __name__ == "__main__":
    main()

Submission status: Accepted

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


def solve(K: int, X: int):
    left = max(-1000000, X-K)
    right = min(1000000, X+K)
    ans = [str(i) for i in range(left+1, right)]
    print(' '.join(ans))
    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())
i = max(-1000000, x - k + 1)
while i <= min(1000000, x + k - 1):
  print(i, end=" ")
  i += 1

Submission status: Accepted

Solution code:
#
# Yet I'm feeling like
# 	There is no better place than right by your side
# 		I had a little taste
# 			And I'll only spoil the party anyway
# 				'Cause all the girls are looking fine
# 					But you're the only one on my mind


import sys
inf = float("inf")
#sys.setrecursionlimit(1000000)


# abc='abcdefghijklmnopqrstuvwxyz'
# abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod,MOD=1000000007,998244353
# vow=['a','e','i','o','u']
# dx,dy=[-1,1,0,0],[0,0,1,-1]

#from cmath import sqrt
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
# from math import ceil,floor,log,sqrt,factorial,pow,pi,gcd,log10
#from bisect import bisect_left,bisect_right
#import numpy as np

def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()

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

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 = 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())
ans = []
for i in range(X-K+1, X+K):
    ans.append(str(i))
print(' '.join(ans).strip())

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(result)):
    print(result[i], end = " ")

Submission status: Accepted

Solution code:
K,X = list(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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A, B = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

hidari = x - k + 1

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

print(" ".join(str(i) for i in ans))

Submission status: Accepted

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

A = max(-1000000,X-(K-1))
B = min(1000000,X+(K-1))

print(" ".join([str(x) for x in range(A,B+1)]))

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf=10**20
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 I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

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

  return ' '.join([str(x) for x in ans])

# main()
print(main())

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
import re
from collections import deque
import sys
import math
input = sys.stdin.readline


def int_raw():
    return int(input())


def ss_raw():
    return input().split()


def ints_raw():
    return tuple(map(int, ss_raw()))


DIV = 10**9+7


def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def ncr(n, r, mod=DIV):
	r = min(r, n-r)
	ret = 1
	for i in range(1, r+1):
		ret = ret * (n-i+1) % mod
		ret = ret * mod_inv(i, mod) % mod
	return ret


def main():
    K,X = ints_raw()
    return " ".join([str(i) for i in range(X-K+1,X+K)])
    
print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

K,X = IL()

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

ans = []
for i in range(l,r+1):
  ans.append(i)

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    k, x = LI()

    mx = x + k - 1
    mn = x - k + 1
    print(' '.join([str(c) for c in list(range(mn, mx+1))]))

solve()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa == x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))

k,x = l()

p = [x + i for i in range(2*k - 1)]

for i in range(len(p)):
    p[i] -= k - 1 

print(jo(p))

Submission status: Accepted

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


def solve(K: int, X: int):

    print(" ".join(map(str,[i for i in range(X-K+1,X+K) if abs(i) <= 1000000])))
    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:
def main():
    k, x = map(int, input().split())
    print(*[i for i in range(x-k+1, x+k)])


main()

Submission status: Accepted

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

print(' '.join([str(t) for t in range(max(x - k + 1, -1000000), min(x + k, 1000001))]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

stone = [0 for i in range(-1000000, 1000001)]
for i in range(X-K+1, X+K):
    if i >= -1000000 and i <= 1000000:
        stone[i] = 1

for i in range(-1000000, 1000001):
    if stone[i] == 1:
        print(i)

Submission status: Accepted

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

minimum = max(-1000000, X - K + 1)
maximum = min(1000000, X + K - 1)
for i in range(minimum, maximum + 1):
    print(i, end = " ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict
# t=int(raw_input())
# while(t!=0):
#     t=t-1

a,b=map(int,raw_input().split())
c=b-a+1
d=a+b
for i in range(c,d):
    print i,

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K,X=map(int,input().split())
print(*list(range(max(X-K+1,-1000000),min(X+K-1,1000000)+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())
n=10**6
a,b=max(-n,x-k+1),min(n,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 = [i for i in range(-1000000, 1000001)]

print(*a[X-K+1+1000000:X+K+1000000])

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:
#　B
K, X = map(int, input().split())
L = range(X - (K - 1), X + K)
print(' '.join(map(str, L)))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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:
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
Mod = 1000000007



def main(): #startline--------------------------------------------
    K,X = map(int,input().split())
    ans = []
    for i in range(X-K+1,X+K):
        ans.append(i)
    print(*ans,sep = " ")
if __name__ == "__main__":
    main() #endline===============================================




def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n < 2 is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))):
        if prime[i] == 1:
            for j in range(2*i,n):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n):
        if prime[i] == 1:
            res.append(i)
    return res

class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py

    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)

Submission status: Accepted

Solution code:
# N = int(input())
K, X = map(int, input().split())
ans = [str(i) for i in range(max(- 10 ** 6, X - K + 1), min(10 ** 6, X + K - 1) + 1)]

print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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