Problem:


Score : 200 points

Problem Statement

Print all the integers that satisfies the following in ascending order:

Among the integers between A and B (inclusive), it is either within the K smallest integers or within the K largest integers.

Constraints

1 \leq A \leq B \leq 10^9

1 \leq K \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

Print all the integers that satisfies the condition above in ascending order.

Sample Input 1

3 8 2

Sample Output 1

3
4
7
8

3 is the first smallest integer among the integers between 3 and 8.

4 is the second smallest integer among the integers between 3 and 8.

7 is the second largest integer among the integers between 3 and 8.

8 is the first largest integer among the integers between 3 and 8.

Sample Input 2

4 8 3

Sample Output 2

4
5
6
7
8

Sample Input 3

2 9 100

Sample Output 3

2
3
4
5
6
7
8
9



Sample input:
3 8 2


Sample output:
3
4
7
8

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
ans = list(range(A, B + 1))
for num in ans:
    if num < min(ans) + K or num > max(ans) - K:
        print(num)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
L=[]
for i in range(c):
  L.append(a+i)
  for j in range(c):
    L.append(b-j)
  
   print(list(set(L)))

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=[]
for i in range(a,b+1):
  l.append(i)
x=l[:2]
y=l[-2:]
z=x+y
print('\n'.join(z))

Submission status: Runtime Error

Solution code:

a,b,k = map(int,input().split())
l = [i for i in range(a,b+1)]
ans = []

for i in range(k):
    ans.append(l[i])
    ans.append(l[(i+1)*(-1)])
ans = set(ans)
ans = list(ans)
ans.sort()
for i in range(len(ans)):
    print(ans[i])

Submission status: Runtime Error

Solution code:
a,b,k = map(int,input().split())
l =list[a:b]
mimi = l[:a-k]
maxi = l[b-k:]
print(mini+maxi)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x = sorted(list(set(x[:k]+x[-k:])))
for i in x:
  print(i)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=list(range(a,b+1))
ans=sorted(set(l[:k])|set(l[-k:]))
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=list(range(a,b+1))
ans=sorted(list(set(l[:k]+l[-k:])))
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=range(a,b+1)
ans=sorted(list(set(l[:k]+l[-k:])))
for i in ans:
print(i)

Submission status: Runtime Error

Solution code:
# ABC 093: B – Small and Large Integers
a, b, k = [int(s) for s in input().split()]
nums = list(range(a, b + 1))
result = []

if k >= len(nums):
    result = nums
else:
    result = [nums[i] for i in set(list(range(0, k)) + list(range(len(nums) - k, len(nums))))]

for num in result:
    print(num)

Submission status: Runtime Error

Solution code:
# ABC 093: B – Small and Large Integers
a, b, k = [int(s) for s in input().split()]
nums = list(range(a, b + 1))
result = []

if k > len(nums):
    result = nums
else:
    result = [nums[i] for i in set(list(range(0, k)) + list(range(len(nums) - k, len(nums))))]

for num in result:
    print(num)

Submission status: Runtime Error

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

l = list(range(a, b+1))
s_uni = set(l[:k]) | set(l[-k:])
for s in sorted(s_uni):
    print(s)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
#%%
l = list(range(a, b+1))
s_uni = set(l[:k]) | set(l[-k:])
for s in s_uni:
    print(s)

Submission status: Runtime Error

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


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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if K>B-A-1:
  K=B-A
  
ans=[]
for i in range(K):
  ans.append(A+i)
for i in range(B-K,B):
  ans.append(i+1)
#print(ans)

n=len(ans)
print(ans[0])
for i in range(1,n):
  if ans[i]!=ans[i-1]:
    print(ans[i])

Submission status: Runtime Error

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

if K>B-A:
  K=B-A
  
ans=[]
for i in range(K):
  ans.append(A+i)
for i in range(B-K,B):
  ans.append(i+1)
#print(ans)

n=len(ans)
print(ans[0])
for i in range(1,n):
  if ans[i]!=ans[i-1]:
    print(ans[i])

Submission status: Runtime Error

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

l = list(range(a, b+1))


if a + k -1 >= b -k +1:
    for i in l:
        print(i)
else:
    for i in range(k):
        print(a+i)
    for i in range(k):
        print(b-k+i+1)

Submission status: Runtime Error

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

l = list(range(a, b+1))

small = l[0:k]
large = l[-k:]

ans = set(small+large)

for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
import sys

def resolve():
    A, B, K = list(map(int, input().split(" ")))
    L = list(range(A, B+1))
    for s in sorted(list(set(L[:K]+L[-K:]))):
        print(s)

if '__main__' == __name__:
    resolve()

Submission status: Runtime Error

Solution code:
a,s,k=map(int,input().split())
if s-a<=2*k-1:print(*list(range(a,s+1)),sep="\n")
else:print(*list(range(a,a+k)),*list(range(s+1-k,s+1)),sep="\n")

Submission status: Runtime Error

Solution code:
A, B, K = list(map(int, input().split()))
left = set(list(range(A, A+k)))
right = set(list(range(b-k+1, b+1)))
[print(i) for i in sorted(list((left | right)))]

Submission status: Runtime Error

Solution code:
A, B, K = list(map(int, input().split()))
l = list(range(A, B + 1))
left = set(l[0:K])
right = set(l[B-K-A+1:])
[print(i) for i in sorted(list((left | right)))]

Submission status: Runtime Error

Solution code:
a,b,k=[int(i) for i in input().split()]
c=list(range(a,b+1))

head=c[:k]
# tail=c[::-1][:k]
# d=head+tail
# e=list(set(d))
# e.sort()
# for i in e:
#     print(i)

Submission status: Runtime Error

Solution code:
a,b,k=[int(i) for i in input().split()]
c=list(range(a,b+1))

head=c[:k]
tail=c[::-1][:k]
d=head+tail
# e=list(set(d))
# e.sort()
# for i in e:
#     print(i)

Submission status: Runtime Error

Solution code:
a,b,k=[int(i) for i in input().split()]
c=list(range(a,b+1))

head=c[:k]
tail=c[::-1][:k]
d=head+tail
e=list(set(d))
e.sort()
for i in e:
    print(i)

Submission status: Runtime Error

Solution code:
a,b,k=[int(i) for i in input().split()]
c=list(range(a,b+1))

d=c[:k]+c[::-1][:k]
e=list(set(d))
e.sort()
for i in e:
    print(i)

Submission status: Runtime Error

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

box = list(range(A, B+1))
s = set()

if len(box) < K:
    for i in box:
        print(i)
    sys.exit()

for i in range(K):
    s.add(box[i])
nb = box[len(box) - K:]
for i in range(K):
    s.add(nb[i])

for k in s:
    print(k)

Submission status: Runtime Error

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

    array = list(range(a,b+1))
    ans = list(set(array[:k]) | set(array[-k:]))
    ans.sort()
    for val in ans:
        print(val)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
l=list(range(a,a+c))
m=list(range(b,a-1,-1))
ans=sorted(set(l+m))
print(*ans)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
l=list(range(a,a+c))
m=list(range(b,a-1,-1))
ans=sort(set(l+m))
print(*ans)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
l=list(range(a,a+c))
m=list(range(b,a-1,-1))
ans=sort(set(l+M))
print(ans)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=list(range(a,b+1))
l1=[]
for i in range(k):
    print(l[i])
    l1.append(l[i])
for j in range(b-k+1,b+1):
    if l[j] not in l1:print(l[j])
    else:pass

Submission status: Runtime Error

Solution code:
import numpy as np


A, B, K = map(int, input().split())
x, y, z = [], [], []
x = np.arange(A, B+1)
y = x[:K]
z = x[-K:]
ans = np.concatenate([y,z])
ans = sorted(set(ans))
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
import numpy as np


A, B, K = map(int, input().split())
x = np.arange(A, B+1)
y = x[:K]
z = x[-K:]
ans = np.concatenate([y,z])
ans = sorted(set(ans))
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
import numpy as np


A, B, K = map(int, input().split())
x = np.arange(A, B+1)
y = x[:K]
z = x[-K:]
ans = np.concatenate([y,z])
ans = set(ans)
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
import numpy as np


A, B, K = map(int, input().split())
x = np.arange(A, B+1)
y = x[:K]
z = x[-K:]
ans = set(y) | set(z)
for i in ans:
    print(i)

Submission status: Runtime Error

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

    line = list(range(a, b+1))
    n = len(line)
    for i in range(n):
        if i < k or n-k <= i:
            print(line[i])


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
l = list(range(a,b+1))
la = l[0:k]
lb = l[-k:]

lc = list(set(la + lb))
lc.sort()
for i in range(len(lc)):
  print(lc[i])

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
numlist = []
 
for i in range(a, b+1):
    if i < a + k or i >  b - k:
        numlist.append(i)

print(numlist[l])

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
an = list(range(a,b+1))
an2 = []
if len(an)<=k:
  for i in an:
    print(i)
elif len(an)>k:
  an2 += an[-k:]
  an2 += an[:k]
an2.sort()
for i in set(an2):
  print(i)

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
an = list(range(a,b+1))
an2 = []
if len(an)<=k:
  for i in an:
    print(i)
elif len(an)>k:
  an2 += an[-k:]
  an2 += an[:k]
an2.sort()
for i in an2:
  print(i)

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
an = list(range(a,b+1))
an2 = []
if len(an)<k:
  for i in an:
    print(i)
elif len(an)>k:
  an2 += an[-k:]
  an2 += an[:k]
an2.sort()
for i in an2:
  print(i)

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
an = list(range(a,b+1))
an2 = []
if len(an)<k:
  for i in range(len(an)):
    print(i)
elif len(an)>k:
  an2 += an[-k:]
  an2 += an[:k]
an2.sort()
for i in an2:
  print(i)

Submission status: Runtime Error

Solution code:
a, b, k = [int(x) for x in input().split()]
lst = list(range(a, b + 1))
res = []
res.extend(lst[:k])
res.extend(lst[-k:])
res = sorted(set(res))
for i in res:
    print(i)

Submission status: Runtime Error

Solution code:
a, b, k = [int(x) for x in input().split()]
lst = list(range(a, b + 1))
res = []
res.extend(lst[:k])
res.extend(lst[-k:])
res = sorted(set(res))
print(*res, sep='\n')

Submission status: Runtime Error

Solution code:
a, b, k = [int(x) for x in input().split()]
lst = list(range(a, b + 1))
res = []
res.extend(lst[:k])
res.extend(lst[-k:])
res = sorted(list(set(res)))
print(*res, sep='\n')

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
"""
if b-a+1<=2*k:
            for i in range(a,b+1):
                        print(i)
else:
            for i in range(a,a+k):
                        print(i)
            for i in range(b-k+1,b+1):
                        print(i)

"""
for i in range(a,b+1):
            #print("i",i)
            if i<a+k:
                        print(i)
            elif b-k<i:
                        print(i)
"""

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split()
            
ans = []
            
for i in range(K):
  if A+i <=B:
    ans.append(A+i)
  if B-i >= A:
    ans.append(B-i)
            
            
ans = sorted(lis(set(ans)))
print(*ans,sep="\n")

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

if  len(x) >=k:
  print(sorted("\n".join(map(str,x))))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

Submission status: Runtime Error

Solution code:
ans =[]

if  len(x) >=k:
  print("\n".join(map(str,x)))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

if  len(x) >=i:
  print("\n".join(map(str,x)))
  exit()

else:
  for i in range(k):
    if len(x) > i:
      if not(x[i] in ans):
        ans.append(x[i])
      if not(x[-(1+i)] in ans):
        ans.append(x[-(1+i)])
  
  ans.sort()

s = "\n".join(map(str,ans))
print(s)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) >= i:
    if not(x[i] in ans):
      ans.append(x[i])
    if not(x[-(1+i)] in ans):
      ans.append(x[-(1+i)])
  
ans.sort()

s = "\n".join(map(str,ans))
print(s)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    if not(x[i] in ans):
      ans.append(x[i])
    if not(x[-(1+i)] in ans):
      ans.append(x[-(1+i)])
  
ans.sort()



s = "\n".join(map(str,ans))
print(s)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    ans.append(x[i])
    ans.append(x[-(1+i)])
  
  
ans.sort()
ans2 =set(ans)


s = "\n".join(map(str,ans2))
print(s)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

for i in range(k):
  if len(x) > i:
    ans.append(x[i])
    ans.append(x[-(1+i)])
  
  
ans.sort()
ans2 =set(ans)


print(ans2)

Submission status: Runtime Error

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

x =list(range(a,b+1))
ans =[]

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


print(ans)

Submission status: Runtime Error

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

x =[a:b+1]
ans =[]

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

print("".joint(ans))

Submission status: Runtime Error

Solution code:
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)//2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Submission status: Runtime Error

Solution code:
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)/2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Submission status: Runtime Error

Solution code:
A,B,K = [int(i) for i in input().rstrip().split()]

nums=list(range(A,B+1))

if K <= len(nums)/2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
 
tmp = list(range(a, b+1))
for a in sorted(set(tmp[:k] + tmp[-k:])):
    print(a)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
 
tmp = range(a, b+1)
for a in sorted(list(set(tmp[:k] + tmp[-k:]))):
    print(a)

Submission status: Runtime Error

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

tmp = list(range(a, b+1))
for a in sorted(list(set(tmp[:k] + tmp[-k:]))):
    print(a)

Submission status: Runtime Error

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

tmp = list(range(a, b+1))
for a in sorted(list(set(tmp[:k] + tmp[::-1][:k]))):
    print(a)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))
C = sorted(list(set(x[:k] + x[-k:])))
for c in C:
    print(c)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))
C = list(set(x[:k] + x[-k:]))
C.sort()
for c in C:
    print(c)

Submission status: Runtime Error

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

if (b - a)  < k * 2:
    for i in range(a, b+1):
        print(i)
    exit()
else:
    for i in range(a,a+k):
    print(i)
  for i in range(b-k+1,b+1):
    print(i)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
R=list(range(a,b+1))
for x in sorted(set(R[:k])|set(R[-k:])):
    print(x)

Submission status: Runtime Error

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

lis=[]
for i in range(a, min(a+k,b+1)):
    lis.append(i)
for i in range(max(a,b-k+1), b+1):
    lis.append(i)


lis=list(set(l)) #重複除去
lis.sort()
for i in lis:
    print(i)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    for i in list(range(A, B + 1)):
        if A <= i <= A + K - 1 or B + 1 >= i >= B - K + 1:
            print(i)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    for i in list(range(A, B + 1)):
        if A - 1 <= i <= A + K - 1 or B + 1 >= i >= B + 1 - K:
            print(i)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
A,B,K = map(int, input().split())
tmp = list(range(A,B+1))
answer = list(set(tmp[:K])|set(tmp[-K:]))
answer.sort()
print(*answer, sep='\n')

Submission status: Runtime Error

Solution code:
A,B,K = map(int, input().split())
tmp = list(range(A,B+1))
answer = list(set(tmp[0:K]+tmp[-K:]))
answer.sort()
print(*answer, sep='\n')

Submission status: Runtime Error

Solution code:
A,B,K = map(int, input().split())
tmp = list(range(A,B+1))
answer = list(set(tmp[0:K]+tmp[-K:]))
print(*answer, sep='\n')

Submission status: Runtime Error

Solution code:
	a, b, k = map(int, input().split())
for i in range(a, a + k):
    if i > b:
        break
    print(i)
for i in range(b - k + 1, b + 1):
    if i < a + k:
        continue
    if i > b:
        break
    print(i)

Submission status: Runtime Error

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

s = list(range(a, b+1))
print(*s[:k], sep="\n")
for i in s[-k:]:
    if i not in s[:k]:
        print(i)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
l = list(range(a, b + 1))
s = set(l[:k])
s.update(l[-k:])
s = sorted(s)
print('\n'.join(map(str, s)))

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
     
ans=[]
     
for i in range(k):
    if a <= a+i <= b:
        ans.append(a+i)
    if a <= b-i <= b:    
        ans.append(b-i)
     
ans.sort(list(set(ans)))
     
for x in ans:
    print(x)

Submission status: Runtime Error

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

arr = []

x = list(range(a,b+1))

for i in range(k):
    arr.append(x[i])

for i in range(k):
    arr.append(x[-1-i])

arr = list(set(arr))

arr.sort()

for i in range(len(arr)):
    print(arr[i])

Submission status: Runtime Error

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

arr = []

whole = list(range(a,b+1))
arr = whole[:k] + whole[len(whole)-k:]
arr = list(set(arr))
arr.sort()
for i in range(len(arr)):
    print(arr[i])

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
a=[]
b=[]
for i in range(A, A+K):
    a.append(i)
for i range(B-K+1, B+1):
    b.append(i)
print(set(a)|set(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
list = []
for i in range(a, b+1):
    list.append(i)
revList = sorted(list, reverse=True)
ans = []
for i in range(k):
    print(list[i])
for i in range(k):
    print(list[-k+i])

Submission status: Runtime Error

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B, K = map(int, readline().split())
se = set(range(A, A + K) | range(B - K + 1, B + 1))
li = list(se)
li = [x for x in li if A << x << B]

li.sort()
print(*li, sep='\n')

Submission status: Runtime Error

Solution code:
a, b, n = map(int, input().split())
lst = list(range(a, b+1))
if (a + 1 - b) // 2 >= n:
  for i in lst:
    print(i)
else:
  for i in lst[:n+1]:
    print(i)
  for i in lst[-n:]:
    print(i)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
res = set(list(range(A,B+1))) &\
     (set([i for i in range(A, A+K)]) | set([i for i in range(B-K+1, B+1)]))
print(*sorted(res), sep="\n")

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input())
S = sorted(set(list(range(A, B+1)[:K]) + list(range(A, B+1)[-K:])))
print(*S, sep="\n")

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
A,B,K = [int(i) for i in input().split()]
d = B - A + 1
li = [0] * d
count = 0
for i in range(d) :
    li[i] = A + count
    count+=1
if d > 2 * K + 1 :
    lia = [0] * 2 * K
    for i in range(K) :
        lia[i] = li[i]
    counta = 0
    for i in range(K,2 * K) :
        lia[i] = li[-K+counta]
        counta += 1
    for i in range(2 * K) :
        print(lia[i])
else :
    for i in range(d) :
        print(li[i])

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
A, B, K = [int(x) for x in input().rstrip().split()]
import numpy as np
x = np.arange(A, B + 1, np.int64)
left = x[:K]
right = x[::-1][:K]
ans = []
for i in left:
    if i not in ans:
        ans.append(i)
for j in right:
    if j not in ans:
        ans.append(j)
ans.sort()
for k in ans:
    print(k)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
A, B, K = [int(x) for x in input().rstrip().split()]
import numpy as np
x = np.arange(A, B + 1)
left = x[:K]
right = x[::-1][:K]
ans = []
for i in left:
    if i not in ans:
        ans.append(i)
for j in right:
    if j not in ans:
        ans.append(j)
ans.sort()
for k in ans:
    print(k)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
A, B, K = [int(x) for x in input().split()]
import numpy as np
x = np.arange(A, B + 1)
left = x[:K]
right = x[::-1][:K]
ans = []
for i in left:
    if i not in ans:
        ans.append(i)
for j in right:
    if j not in ans:
        ans.append(j)
ans.sort()
for k in ans:
    print(k)

Submission status: Runtime Error

Solution code:
# -coding: utf-8 -

a,b,k = map(int, input().split())

s = range(a,b+1)
add = "\n"
#print(s)

if len(s) < k*2:
    strs = [str(num) for num in s]
    k = add.join(strs)
else:
    s_left = s[:k]
    s_right = s[-k:]
    s2 = s_left+s_right
    strs = [str(num) for num in s2]
    k = add.join(strs)
print(k)

Submission status: Runtime Error

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

a = list(range(A,B+1))
if B-A+1 <= 2*K:
    for ans in a:
        print(ans)
else:
    for ans in a[:K]:
        print(ans)
    for ans in a[-K:]:
        print(ans)

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
N = [x for x in range(A,B+1)]
print("\n".join(map(str,sorted(N if K >= B else list(set([N[-x] for x in  range(1,K+1)] + [N[x] for x in  range(K)]))))))

Submission status: Runtime Error

Solution code:
A,B,K =(map(int,input().split()))
TL = list(range(A,B+1))
L = [i for i in TL if ((i>=A) and i<=A+K-1)] 
LU =  [i for i in TL if  ((i>=B-K+1) and i<=B)] 
#L.append( [i for i in TL if ((i<=B) and (i>=B-K))])
LL = set(L + LU)
for i in LL:
    print(i)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
for i in range(a,b+1):
  if i<a+n or i>b-n:
    print(i)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

#define SZ(x) (int)(x.size())

using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

int f(int a) {
  return (a * a + 4) / 8;
}

ll memo[1000];
ll fib(ll n) {
  if(n == 0) return 2;
  else if(n == 1) return 1;
  else if(memo[n]) return memo[n];
  else return memo[n] = fib(n-1) + fib(n-2);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  ll a, b, k; cin >> a >> b >> k;
  set<int> st;
  for(int i=a;i<min(b, a+k);++i) {
    st.insert(i);
  }
  for(int i=max(a, b-k+1);i<=b;++i) {
    st.insert(i);
  }
  for(auto &e: st) {
    cout << e << endl;
  }
}

Submission status: Runtime Error

Solution code:
a,b,k = list(map(int, input().split()))
if(b-a <= 200):
  for i in rage(a, b):
    if(i <= a + k or b - k <= i):
      print(i)
else:
  for i in range(a, a+k):
    print(i)
  for i in range(b+k, b+1):
    print(i)

Submission status: Runtime Error

Solution code:
A, B, K =list(map(int,input().split()))
C =[]

for i in range(A , B + 1):
    C.append(i)


N = len(C)

if N > 2* K:
    for i in range(K):

    for j in range(K):
  
else:
    for i in C:
        print(i)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
lst = list(range(A, B+1))
ans = set(lst[:K] + lst[-K:])
ans = list(sorted(ans))
for i in ans:
  print(i)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
lst = list(range(A, B+1))
ans = set(lst[:K] + lst[-K:])
ans = sorted(ans)
for i in ans:
  print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def in_range(a,b,n):
  return a <= n and b >= n:

for i in range(a,b+1):
  if in_range(mn,mn+k) or in_range()(mx-k,mx):
    print(i)

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = range(a, b + 1)
    
    query_range = list(query_range)
    print('なんだこのバグ')
    exit()

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = range(a, b + 1)
    
    query_range = list(query_range)
    print('aaa')
    exit()

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    a, b, k = int(a), int(b), int(k)
    query_range = list(range(a, b + 1))

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = list(range(a, b + 1))

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.read().split()]
    query_range = list(range(a, b + 1))
    print(a, b)
    exit()
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    print(a, b)
    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    print('aaa')
    sys.exit()
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    print(query_range)
    sys.exit()
    # for i in res:
    #     print(i)
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    
    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    
    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()