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, raw_input().split())
AB = range(A, B + 1)
if B - A + 1 > 2 * K:
	for i in AB[:K]:
		print i
	for i in AB[-K:]:
		print i
else:
	for i in AB:
		print i

Submission status: Runtime Error

Solution code:
A, B, K = map(int, raw_input().split())
AB = range(A, B + 1)
if len(AB) > 2 * K:
	for i in AB[:K]:
		print i
	for i in AB[-K:]:
		print i
else:
	for i in AB:
		print i

Submission status: Runtime Error

Solution code:
A, B, K = map(int, raw_input().split())
AB = range(A, B + 1)
if len(AB) > 2 * K:
	for i in AB[:K]:
		print i
for i in AB[-K:]:
	print i

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k = map(int,input().split())
num=[i for i in range(a,b+1)]
num = sorted(set(num[:k]+num[num.index(b-k+1) if b-k > 0 else -1:]))

for i in num:
  print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = []
if len(AB[:K]) >= 1 and len(AB[-K:]) >= 1 :
    ans = sorted(set(AB[:K]+AB[-K:]))

elif len(AB[:K]) >= 1:
    ans = sorted(AB[:K])
elif len(AB[-K]) >= 1:
    ans = sorted(AB[:-K])
    
if len(ans)>=1:
    for i in ans:
        print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
AB = list(range(A, B+1))


ans = set(AB[:K]+AB[-K:])

for i in sorted(ans):
    print(i)

Submission status: Runtime Error

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

for i in ans:
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for _ in sorted(set(X[:K]) | set(X[-K:])):
  print(_)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, input().split())
X = list(range(A,B+1))
ans = X[:K] + X[-K:]

for _ in sorted(set(ans)):
  print(_)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, input().split())
X = list(range(A,B+1))
ans = X[:K] + X[-K:]

for _ in set(ans):
  print(_)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
l = list(range(A,B+1)) 
if B-A+1 <= 2*(K+1):
  for e in l:
    print(e)
elif B-A+1 > 2*(K+1):
  del l[K:-K]
  for e in l:
    print(e)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
l = list(range(A,B+1)) 
if B-A+1 <= 2*K:
  for e in l:
    print(e)
elif B-A+1 > 2*K:
  del l[K:-K]
  for e in l:
    print(e)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split( ))
n=b-a+1
c=list(range(a,b+1))
c_a=c[:k]
c_b=c[n-k:n]
c_ans=list(set(c_a+c_b))
c_ans.sort()
for i in range(len(c_ans)):
    print(c_ans[i])

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split( ))
n=b-a+1
c=list(range(a,b+1))
c_a=c[:k]
c_b=c[n-k:n]
c_ans=list(set(c_a+c_b))
for i in range(len(c_ans)):
    print(c_ans[i])

Submission status: Runtime Error

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

if b - a + 1 <= k * 2:
    for i in range(a, b+1):
        print(i)
else:
    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 = list(map(int, input().split()))

l = list(range(a, b + 1))
l_low = l[:k]
l_up = l[-k:]

ll = sorted(list(set(l_low + l_up)))
for i in ll:
    print(i)

Submission status: Runtime Error

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

l = list(range(a, b + 1))
l_low = l[:k]
l_up = l[-k:]

ll = sorted(list(set(l_low + l_up)))

for i in ll:
    print(i)

Submission status: Runtime Error

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

l = list(range(a, b + 1))
l_low = l[:k]
l_up = l[-k:]

ll = sorted(list(set(l_low + l_up)))
for i in ll:
    print(i)

Submission status: Runtime Error

Solution code:
#93b
a,b,k=map(int,input().split())
ans=[]

if abs(a-b)<=k:
    for _ in range(b-a+1):
        print(a+i)
    exit()
else:
    for i in range(k):
        ans.append(a+i)
        
    for i in range(k):
        ans.append(b-k+i+1)
       
ans=set(ans)
for i in ans:
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

nums = range(a, b+1) if b-a <= k else list(range(a, a+k)) + list(range(b+1-k, b+1))
nums.sort()
for num in nums:
    print(num)

Submission status: Runtime Error

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

ab_nums = list(range(a, b+1))
end_nums = list(set(ab_nums[:k] + ab_nums[-k:]))
end_nums.sort()

for num in end_nums:
    print(num)

Submission status: Runtime Error

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

ab_nums = list(range(a, b+1))
end_nums = ab_nums[:k] + ab_nums[-k:]
end_nums.sort()

for num in end_nums:
    print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if B-A <= K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K+1, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)

Submission status: Runtime Error

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

if B-A <= K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)

Submission status: Runtime Error

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

if B-A < K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k jn range(n[1]-n[2]+1,n[1]):
    print(k)

Submission status: Runtime Error

Solution code:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for i in range(n[0],n[0]+n[2]):
    print(i)
  for i jn range(n[1]-n[2]+1,n[1]):
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num=list(range(A,B+1))
num_rev=num[::-1]
if len(num)-2*K>=0:
    for i in range(K):
        print(num[i])
    for i in range(K):
        print(num_rev[K-i-1])
else:
    for i in num:
        print(i)

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num=list(range(A,B+1))
num_rev=num[::-1]
if len(num)-2*K>0:
    for i in range(K):
        print(num[i])
    for i in range(K):
        print(num_rev[K-i-1])
else:
    for i in num:
        print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num_right=num[:K]
num_left=sorted(num,reverse=True)[:K]
ans=list(set(num_right+num_left))
for i in ans:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num=list(range(A,B+1))
if len(num)%2!=0:
    ans_list=num[:K]+num[len(num)-K+1:]
elif len(num)%2==0:
    ans_list=num[:K]+num[len(num)-K:]
elif len(num)-K>0 or len(num)-K+1>0:
    ans_list=num[:K]
for i in range(len(ans_list)):
    print(ans_list[i])

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num=list(range(A,B+1))
if len(num)-K>0:
    if len(num)%2!=0:
        ans_list=num[:K]+num[len(num)-K+1:]
    else:
        ans_list=num[:K]+num[len(num)-K:]
else:
    ans_list=num[:K]
for i in range(len(ans_list)):
    print(ans_list[i])

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
num=list(range(A,B+1))
if len(num)+1-K>=0:
    ans_list=num[:K]+num[len(num)-K+1:]
else:
    ans_list=num[:K]
for i in range(len(ans_list)):
    print(ans_list[i])

Submission status: Runtime Error

Solution code:
[a,b,k]=[int(i) for i in input().split()]
s=list(range(a,b+1))
#print(s)
if (2*k)<=(b-a+1):
    for i in range(k):
        print(int(s[i]))
    for i in range(k):
        print(int(s[b-a-(k-i-1)]))
else:
    for i in range(b-a+1):
        print(s[i])

Submission status: Runtime Error

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

li = [i for i in range(a,b+1)]
print(li[0])
print(li[k-1])
print(li[b+1-k-a])
print(li[b-a])

Submission status: Runtime Error

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

li = [i for i in range(a,b+1)]
print(li[0])
print(li[k-1])
print(li[-k])
print(li[-1])

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
if 2 * K > B - A + 1:
	for i in l:
		print(i)
else:
	for i in range(A, A + K):
		print(i)
	for j in range(B - K + 1, B + 1):
		print(j)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
l = [int(x) for x in range(A, B + 1)]
ans = []
for i in range(K):
	ans.append(l[i])
l.reverse()
for j in range(K):
	ans.append(l[j])
ans.sort()
for k in ans:
	print(k)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(A, min(A+K, B)):
    print(i)

for j in range(max(i+1, B-K+1), B+1): 
    print(j)

Submission status: Runtime Error

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

for i in range(A, min(A+K, B)):
    print(i)

for j in range(max(A, B-K+1), B+1): 
    if j <= i:
        pass
    else:
        print(j)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve(): 
    a,b,k = map(int,input().split())
    li = list(range(a,b+1))
    if b - a + 1 >= 2 * k:
        for i in li[:k]:
            print(i)
        for i in li[-k:]:
            print(i)
    else:
        for i in li:
            print(i)
            
if __name __ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
import sys

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

numlist = list(range(a, b + 1))
output = []

if k >= len(numlist):
  for i in numlist:
    print(i)
  sys.exit()

for i in numlist:
  if i in numlist[:k] or i in numlist[-k:]:
    output.append(i)

for i in output:
  print(i)

Submission status: Runtime Error

Solution code:
import sys

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

numlist = list(range(a, b + 1))
output = []

if k >= len(numlist):
  for i in numlist:
    print(i)
  sys.exit()

for i in range(a, b + 1):
  if i in numlist[:k] or i in numlist[-k:]:
    output.append(i)

for i in output:
  print(i)

Submission status: Runtime Error

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

numlist = list(range(a, b + 1))
output = []

for i in range(a, b + 1):
  if i in numlist[:k] or i in numlist[-k:]:
    output.append(i)

for i in output:
  print(i)

Submission status: Runtime Error

Solution code:
a,b,k = map(int, input().split())
x = list(range(a,b+1))
y = x[0:k]
z = x[len(x)-k:len(x)]
a = []
for i in range(len(y)):
    a.append(y[i])
for i in range(len(z)):
    a.append(z[i])
a_uniq = []
for i in a:
    if i not in a_uniq:
        a_uniq.append(i)
for i in range(len(a_uniq)):
    print(a_uniq[i])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

z = list(range(a, b + 1))
ans = sorted(list(set(z[:k]) | set(z[-k:])))
print(ans)

Submission status: Runtime Error

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

l = []
for i in range(K):
  	a = A + i
    b = B - i
	l.append(a)
    l.append(b)
    if a >= b:
      break

l = list(set(l))
l.sort()
for i in l:
  print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
kazu = list(range(A,B+1))
for i in kazu:
	if i < A+K or B-K < i:
		print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
list1 = list(range(A,B+1))
for i in list1:
	if i < A+K or B-K < i:
		print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
list1 = list(range(A,B+1))
for i in list1:
	if A+K <= i <= B-K:
		pass
	else:
		print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input())
st = set(range(a, min(b, a+k)+1)) + set(range(b, max(a, b-k)-1, -1))
for i in sorted(st):
    print(i)

Submission status: Runtime Error

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

ablist = list(range(A,B+1))
plist = []

for i in range(K):
    plist.append(A+i)
    plist.append(B-i)
    
plist = list(set(plist) & set(ablist))

plist.sort()

for i in plist:
    print(i)

Submission status: Runtime Error

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

ablist = list(np.arange(A,B+1))
plist = []

for i in range(K):
    plist.append(A+i)
    plist.append(B-i)
    
plist = list(set(plist) & set(ablist))

plist.sort()

for i in plist:
    print(i)

Submission status: Runtime Error

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

ablist = list(np.arange(A,B+1))
plist = []

for i in range(K):
    plist.append(A+i)
    plist.append(B-i)
    
plist = list(set(plist) & set(ablist))

plist.sort()

for i in plist:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
li = list(range(A,B+1))

from_A = li[0:K]
to_B = li[-K::]

sum_li  = list(set(from_A + to_B))

for i in sum_li:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
ans = []
for i in range(A,A+K):
    if i <= B:
        ans.append(i)
for i in range(B-K+1,B+1):
    if not i in ans and A <= i:
        ans.append(i)
for i in ans:

Submission status: Runtime Error

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

if b-a+1 > 2*c:
    for i in range(a,a+c):
    print(i)
    for i in range(b-c+1,b):
    print(i)
else:
    for i in range(a,b+1):
    print(i)

Submission status: Runtime Error

Solution code:
m = list(map(int, input().split()))
A = m[0]
B = m[1]
K = m[2]

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

if len(g) <= 2*K:
    for v in g:
        print(v)
else:
    for i in range(K):
        print(g[i])
    for i in range(len(g)-K, len(g)):
        print(g[i])

Submission status: Runtime Error

Solution code:
m = list(map(int, input().split()))
A = m[0]
B = m[1]
K = m[2]

g = list(range(A, B+1))
print(g)

if len(g) <= 2*K:
    for v in g:
        print(v)
else:
    for i in range(K):
        print(g[i])
    for i in range(len(g)-K, len(g)):
        print(g[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
a,b,k=map(int,input().split())
d=list(range(a,b+1))
s=set()
for i in range(min(k,len(d))):
    s.add(d[i])
    s.add(d[len(d)-1-i])
print(*sorted(list(s)),sep='\n')

Submission status: Runtime Error

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

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define PI 3.141592653589793
#define MOD 1000000007

typedef long long ll;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a,b,k;
    cin >> a >> b >> k;

    for(int i = a; i < min(a+k, b+1); ++i) cout << i << endl;
    for(int i = max(b-k+1, a+k); i <= b; ++i) cout << i << endl;

    return 0;
}

Submission status: Runtime Error

Solution code:
A, B, K = list(map(int, input().strip().split(' ')))
tmplist = list([i for i in range(A,B+1)])
for j in range(len(tmplist)):
    if tmplist[j] > A+K and tmplist[j] < B-K:
        tmplist.pop(j)

for k in tmplist:
    print(k)

Submission status: Runtime Error

Solution code:
for x in (list(range(a, a+k)) + list(range(b-k, b))):
    print(x)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, raw_input().split())
  
for i in range(B+1):
    if i >= A and i <= A + K - 1:
        print(i)
    elif (i >= A and i >= B - K + 1 and i <= B):
        print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, raw_input().split())
  
for i in range(B+1):
    if (i >= A and i <= A + K - 1) or (i >= B - K + 1 and i <= B):
        print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, raw_input().split())
  
for i in range(A,B+1):
    #if (i >= A and i <= A + K - 1) or (i >= B - K + 1 and i <= B):
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, raw_input().split())
  
for i in range(A,B+1):
    if (i >= A and i <= A + K - 1) or (i >= B - K + 1 and i <= B):
        print(i)

Submission status: Runtime Error

Solution code:
A,B,K = map(int, raw_input().split())
  
for i in range(A,B+1):
    if (i >= A and i <= A + K - 1) or (i >= B - K + 1 and i <= B):
        print(i)

Submission status: Runtime Error

Solution code:
x,y,z=[int(i) for i in input().split()]
S=list(range(x,y+1))
if x<z and z<y:
    S.pop(z-x)
for num in S:
    print(num)

Submission status: Runtime Error

Solution code:
x,y,z=[int(i) for i in input().split()]
S=list(range(x,y+1))

if x<z:
    for j in range(0,min(z-x,y-x+1)):
        print(S[j])
if z<y:
    for j in range(max(z-x+1,x),y-x+1):
        print(S[j])

Submission status: Runtime Error

Solution code:
x,y,z=[int(i) for i in input().split()]
S=list(range(x,y+1))

if x<z:
    for j in range(0,z-x):
        print(S[j])
if z<y:
    for j in range(z-x+1,y-x+1):
        print(S[j])

Submission status: Runtime Error

Solution code:
x,y,z=map(int,input().split())
S=list(range(x,y+1))

if x<z:
    for j in range(0,z-x):
        print(S[j])
if z<y:
    for j in range(z-x+1,y-x+1):
        print(S[j])

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
ls = list(range(a, b + 1))
lsRe = ls[::-1]
s = set()

if len(ls) > k:
    for i in range(k):
        s.add(ls[i])
        s.add(lsRe[i])
else:
    print(*ls, sep="\n")
    quit()

s = sorted(s)
print(*s, sep="\n")

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
ls = list(range(a, b + 1))
lsRe = ls[::-1]
s = set()

if len(ls) > k:
    for i in range(k):
        s.add(ls[i])
        s.add(lsRe[i])
else:
    print("ls", *ls, sep="\n")
    quit()

s = sorted(s)
print("set", *s, sep="\n")

Submission status: Runtime Error

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

if len(ls) > k:
    for i in range(k):
        s.add(ls[i])
        s.add(ls[len(ls) - (i + 1)])
else:
    print(*ls, sep="\n")
    quit()

print(*s, sep="\n")

Submission status: Runtime Error

Solution code:
a,b,k=map(list(input().split(" ")),int)
if b-a+1 <= k*2:
   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)

Submission status: Runtime Error

Solution code:
import numpy as np

A, B, K = (int(i) for i in input().split())
a = np.arange(A, B + 1)
b = []

if K > len(a):
    K = len(a)
else:
    pass

for i in range(K):
    if a[i] not in b:
        b.append(a[i])
    else:
        pass
    
for i in range(K):
    if a[-i -1] not in b:
        b.append(a[-i - 1])
    else:
        pass

b.sort()

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

Submission status: Runtime Error

Solution code:
import numpy as np

A, B, K = (int(i) for i in input().split())
a = np.arange(A, B + 1)
b = []

for i in range(K):
    if a[i] not in b:
        b.append(a[i])
    else:
        pass
    
for i in range(K):
    if a[-i -1] not in b:
        b.append(a[-i - 1])
    else:
        pass

b.sort()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if b - a <= 2*k - 1:
  print(*range(a, b+1))
else:
  print(*range(a, a+k))
  print(*range(b-k+1, b+1)

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
list_range = list(range(a, b+1))
try:
    result = set(list_range[:k]) | set(list_range[-k:])
    if result:
        for num in sorted(result):
            print(num)
except:
    print('')

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
try:
list_range = list(range(a, b+1))
result = set(list_range[:k]) | set(list_range[-k:])
if result:
    for num in sorted(result):
        print(num)
except:
    print('')

Submission status: Runtime Error

Solution code:
try:
    a, b, k = [int(tmp) for tmp in input().split(' ')]
except:
    print('')
list_range = list(range(a, b+1))
result = set(list_range[:k]) | set(list_range[-k:])
if result:
    for num in sorted(result):
        print(num)

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
try:
    list_range = list(range(a, b+1))
except:
    print('affdaf')
result = set(list_range[:k]) | set(list_range[-k:])
if result:
    for num in sorted(result):
        print(num)

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
list_range = list(range(a, b+1))
result = set(list_range[:k]) | set(list_range[-k:])
try:
    if result:
        for num in sorted(result):
            print(num)
except:
    print('affdaf')

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
list_range = list(range(a, b+1))
try:
    result = set(list_range[:k]) | set(list_range[-k:])
except:
    print('affdaf')
if result:
    for num in sorted(result):
        print(num)

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
list_range = list(range(a, b+1))
result = set(list_range[:k]) | set(list_range[-k:])
if result:
    for num in sorted(result):
        print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, k = [int(tmp) for tmp in input().split(' ')]
list_range = list(range(a, b+1))
result = list_range[:k]
result.extend(list_range[-k:])
for num in result:
    print(num)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
k=int(input())

c=b-a+1

a1=[]
b1=[]

for i in range(k):
    a1.append(a+i)
    b1.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(a1[i])
    for i in range(k):
        print(b1[k-i-1])

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
k=int(input())

c=b-a+1

aa=[]
bb=[]

for i in range(k):
    aa.append(a+i)
    bb.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(aa[i])
    for i in range(k):
        print(bb[k-i-1])

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
k=int(input())

c=b-a+1

aa=[]
bb=[]

for i in range(k):
    aa.append(a+i)
    bb.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(aa[i])
    for i in range(k):
        print(bb[k-i-1])

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

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
if a + k >= b:
  a_k = b
else:
  a_k = a + k

if b - k <= 0:
  b_k = a
else:
  b_k = b - k


result = sort(list(set([i for i in range(a, a_k + 1)] + [i for i in range(b_k, b + 1)])))
for n in result:
  print(n)

Submission status: Runtime Error

Solution code:
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[1]+1):
	if i < inpt[0] + inpt[2] or inpt[1] - inpt[2] < i:
		print i

Submission status: Runtime Error

Solution code:
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[1]+1):
	if i < inpt[0] + inpt[2] or inpt[1] - inpt[2] < i:
		print i

Submission status: Runtime Error

Solution code:
#A = input('Aを入力してください')
#B = input('Bを入力してください')
#K = input('Cを入力してください')
#print('A= ', A)
#print('B= ', B)
#print('K= ', K)

#A = 1
#B = 10
#K = 6

S = input()
S = S.split(' ')

#for i in range(len(S)):
#    print(S[i])

A = S[0]
B = S[1]
K = S[2]

ANS = []

for i in range(K + 1):
    ANS.append(A + i)


for j in range(K + 1):
    if B - j not in ANS:
        ANS.append(B - j)

ANS.sort()

#print(ANS)

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

Submission status: Runtime Error

Solution code:
#A = input('Aを入力してください')
#B = input('Bを入力してください')
#K = input('Cを入力してください')
#print('A= ', A)
#print('B= ', B)
#print('K= ', K)

#A = 1
#B = 10
#K = 6

S = input()
S = S.split(' ')

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

A = S[0]
B = S[1]
K = S[2]

ANS = []

for i in range(K + 1):
    ANS.append(A + i)


for j in range(K + 1):
    if B - j not in ANS:
        ANS.append(B - j)

ANS.sort()

#print(ANS)

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

Submission status: Runtime Error

Solution code:
#A = input('Aを入力してください')
#B = input('Bを入力してください')
#K = input('Cを入力してください')
#print('A= ', A)
#print('B= ', B)
#print('K= ', K)

#A = 1
#B = 10
#K = 6

S = input()

A = S[0]
B = S[1]
K = S[2]

ANS = []

for i in range(K + 1):
    ANS.append(A + i)


for j in range(K + 1):
    if B - j not in ANS:
        ANS.append(B - j)

ANS.sort()

#print(ANS)

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

Submission status: Runtime Error

Solution code:
A = input('Aを入力してください')
B = input('Bを入力してください')
K = input('Cを入力してください')
#print('A= ', A)
#print('B= ', B)
#print('K= ', K)

#A = 1
#B = 10
#K = 6

ANS = []

for i in range(K + 1):
    ANS.append(A + i)


for j in range(K + 1):
    if B - j not in ANS:
        ANS.append(B - j)

ANS.sort()

#print(ANS)

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