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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

nums = list(range(a, b+1)) if b-a <= k else list(range(a, a+k)) + list(range(b+1-k, b+1))
nums.sort()

print("\n".join([str(m) for m in nums]))

Submission status: Wrong Answer

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

nums = list(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: Wrong Answer

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

for num in nums:
    print(num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, x = map(int, input().split())
s = set()
for i in [j for j in range(a, max(b + 1, a + x))] :
  print(i)
  s.add(i)
for i in [j for j in range(max(a, b - x + 1), b + 1)] :
  if i not in s:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, x = map(int, input().split())
l = [i for i in range(a, b+1)]
s = set()
for i in l[:x]:
  print(i)
  s.add(i)
for i in l[-x-1:]:
  if i not in s:
    print(i)

Submission status: Wrong Answer

Solution code:
a, b, x = map(int, input().split())
l = [i for i in range(a, b+1)]
for i in l:
  if i <= a + x and b - x <= i:
    print(i)

Submission status: Wrong Answer

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

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: Wrong Answer

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

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)

print(E)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

b =set(a[0:K]+a[-K:])
print(sorted(b))

Submission status: Wrong Answer

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

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

for i in a[0:K]:
    print(i)
for j in a[-K:]:
    print(j)

Submission status: Wrong Answer

Solution code:
A,B,K = [3,8,2]#map(int,input().split())

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

for i in a[0:K]:
    print(i)
for j in a[-K:]:
    print(j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)

Submission status: Wrong Answer

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]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]+1):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)

Submission status: Wrong Answer

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

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

    ab = [i for i in range(a, b+1)]
    order_list = []
    #print(ab)

    if b - a < k:
        for i in ab:
            print(i)
        exit()
    
    for i in range(k):
        if i not in order_list:
            order_list.append(ab[i])
            print(ab[i])
    for j in range(k,0,-1):
        if j not in order_list:
            order_list.append(ab[-j])
            print(ab[-j])
    #print(order_list)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


l = [i for i in range(a, min(b-1,a+k))] + [i for i in range(b, max(a-1,b-k),-1)]
l = list(set(l))
l.sort()

for i in l:
    print(i)

Submission status: Wrong Answer

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


l = [i for i in range(a, min(b,a+k))] + [i for i in range(b, max(a,b-k),-1)]
l = list(set(l))
l.sort()

for i in l:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

abc(a,b,k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,k = map(int,input().split())
if a + k <= b+ 1:
	y = a + k
else:
	y = b+1

for i in range(a,y):
	print(i)
if a + k -1 <= b-k+1:
	x = b-k + 1
else:
	x = a + k

if a != b and k != 1:
	for i in range(x,b+1):
		print(i)

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,k = map(int,input().split())
if a + k <= b+ 1:
	y = a + k
else:
	y = b+1

for i in range(a,y):
	print(i)
if a + k -1 <= b-k+1:
	x = b-k + 1
else:
	x = a + k
for i in range(x,b+1):
	print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
K = min(K,B-A+1)
S = set()
for i in range(K):
    S.add(A + i)
for i in range(K):
    S.add(B - i)

for x in S:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
s=set()
for i in range(K):s|={A+i,B-i}
print(*sorted(s),sep='\n')

Submission status: Wrong Answer

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

l1 = list(range(A,min(B+1,A+K)))
l2_lower = max(0,(B+1) - K)
l2 = list(range(l2_lower, B+1))
for n in sorted(list(set(l1+l2))):
    print(n)

Submission status: Wrong Answer

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

l1 = list(range(A,A+K))
l2_lower = max(0,(B+1) - K)
l2 = list(range(l2_lower, B+1))
for n in sorted(list(set(l1+l2))):
    print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
u = set()
for i in range(k):
    u.add(a + i)
    u.add(b - i)

print(*sorted(list(u)), sep='\n')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
l = [int(x) for x in range(A, B + 1)]
ans = []
if K > len(l):
	for i in l:
		print(i)
else:
	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: Wrong Answer

Solution code:
a, b, k = map(int, raw_input().split())
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 range(a, b + 1):
		print i

Submission status: Wrong Answer

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

if B-A>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 range(A,B+1):
    print(i)

Submission status: Wrong Answer

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

ans=set(s)
for i in ans:
    print(i)

Submission status: Wrong Answer

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

ans=set(s)
for i in ans:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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):
    print(i)
  for i in range(B - K + 1, B + 1):
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
a = [A+i for i in range(K) if A+i <= B]
b = [B-K+1+i for i in range(K) if B-K+1-i >= A]
a.extend(b)
a = set(a)
a = [x for x in a]
a.sort()
for i in range(len(a)):
  print(a[i])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ret = set(range(A, A + K))
ret.update(range(B - K+1, B+1))

for r in sorted(ret):
    print(r)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ret = set(range(A, A + K))
ret.update(range(B - K+1, B+1))

for r in ret:
    print(r)

Submission status: Wrong Answer

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

ans = []
if k > len(data):
    for i in ans:
        print(i)
else:
    for i in range(k):
        if data[i] not in ans:
            ans.append(data[i])        
    for i in range(len(data) - k, len(data)):
        if data[i] not in ans:
            ans.append(data[i])
    
    for i in ans:
        print(i)

Submission status: Wrong Answer

Solution code:
S = input().split(" ")
A = int(S[0])
B = int(S[1])
A_B = range(A, B)
K = int(S[2])
A_B_1 = A_B[ :K-1]
A_B_2 = A_B[-(K-1):]
print(K)
print(A_B)
print(A_B_1)
print(A_B_2)
list1 = list(A_B_1)
list2 = list(A_B_2)

SUM = list1 + list2
for i in range(0,len(SUM)):
    print(SUM[i])

Submission status: Wrong Answer

Solution code:
S = input().split(" ")
A = int(S[0])
B = int(S[1])
A_B = range(A, B)
K = int(S[2])
A_B_1 = A_B[ :K-1]
A_B_2 = A_B[-(K-1):]
print(K)
print(A_B)
print(A_B_1)
print(A_B_2)
list1 = list(A_B_1)
list2 = list(A_B_2)

SUM = list1 + list2
print(SUM)

Submission status: Wrong Answer

Solution code:
a, b, k = [int(c) for c in raw_input().split()]
data = []

for i in range(k):
    data.append(a+i)
for i in range(k-1, -1, -1):
    if b-i <= data[-1]: continue
    data.append(b-i)
print " ".join(str(d) for d in data)

Submission status: Wrong Answer

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

S=set()
for i in range(k):
    if a+i < b:
        S.add(a+i)
    if b-i > a:
        S.add(b-i)
S = [x for x in S]
S.sort()
for i in range(len(S)):
    print(S[i])

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b,k = map(int,input().split())
data = [i for j in (range(a,a+k),range(b-k+1,b+1)) for i in j]
data = np.unique(data)
for i in data:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c  = map(int,input().split())
li = []
for i in range(c):
    if(a+i < b-i):
        li.extend([a+i,b-i])
    else:
        break
for i in sorted(set(li)):
    print(i)

Submission status: Wrong Answer

Solution code:
a,b,c  = map(int,input().split())
li = []
for i in range(c):
    if(a+i < b-i):
        li.extend([a+i,b-i])
    else:
        break
for i in sorted(li):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

for i in range(K):
    if A+i <= B:
        print(A+i)

for i in range(K):
    if B-K+i >= A + K:
        print(B-K+i)

Submission status: Wrong Answer

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

if 2 * K <= B - A:
    x = 0
    while x < K:
        print(A + x)
        x += 1
    while x > 0:
        print(B - x)
        x -= 1
    
else:
    x = A
    while x <= B:
        print(x)
        x += 1

Submission status: Wrong Answer

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

if K <= B - A:
    x = A
    while x <= A+K-1:
        print(x)
        x += 1
    if A+K < B-K:
        x = B - K + 1
        while x <= B:
            print(x)
            x += 1
    else:
        x = A + K
        while x <= B:
            print(x)
            x += 1
else:
    x = A
    while x <= B:
        print(x)
        x += 1

Submission status: Wrong Answer

Solution code:
def main5():
    str = input("");
    #unk
    buf = str.split();
    num = [];
    for i in range(3):
        num.insert(i,int(buf[i]));
    for i in range(num[2]):
        print(num[0] + i,end=' ');
    for i in range(num[2]):
        print(num[1] - (num[2]-1) + i,end=' ');

    #end


if __name__ == '__main__':
    #main4()
    main5()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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 - 1, B + 1):
        print(i)

Submission status: Wrong Answer

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

res = []

for i in range(a, min(a+k, b)):
    res.append(i)

for j in range(max(a, b-k)+1, b+1):
    res.append(j)

for k in sorted(set(res)):
    print(k)

Submission status: Wrong Answer

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

res = []

for i in range(a, min(a+k, b)):
    res.append(i)
print(res)
for j in range(max(0, b-k)+1, b+1):
    res.append(j)

for k in sorted(set(res)):
    print(k)

Submission status: Wrong Answer

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

if B - A <=  K + 1:
    for item in range(A, B + 1):
        print(item)
else:
    for item in range(A, A + K):
        print(item)
    for item in range(B - K + 1, B + 1):
        print(item)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
b=min(A+K,B)
for i in range(A,b+1):
    print(i)
b2=max(b+1,B-K)
for i in range(b2,B+1):
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
b=min(A+K,B)
for i in range(A,b+1):
    print(i)
for i in range(b+1,B+1):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,X = map(int,input().split())
if((B-A)/2 <= X):
    for i in range(A,B+1):
        print(i)
else:
    for j in range(A,A+X):
        print(j)
    for k in range(B+1-X,B+1):
        print(k)

Submission status: Wrong Answer

Solution code:
l = list(map(int,input().split()))
a,b,k = l[0],l[1],l[2]
c = []
for i in range(a,min(a+k,b)):
    c.append(i)
for i in range(max(b-k+1,0),b+1):
    if i not in c:
        c.append(i)
for i in c:
    print(i)

Submission status: Wrong Answer

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

if B-A <= 2 * K :
    for i in range(A, B+1):
        print(i)
else:
    for i in range(K):
        print(A+i)
    for i in range(K):
        print(B-K+i+1)

Submission status: Wrong Answer

Solution code:
A,B,K =map(int,input().split())
T =[]
for i in range(A,min(A+K,B+1)):
    T.append(str(i))
for j in range(max(A+K,B-K+1),B+1):
    T.append(str(j))
S = (sorted(set(T)))
print('\n'.join(S))

Submission status: Wrong Answer

Solution code:
A,B,K =map(int,input().split())
T =[]
for i in range(A-1,A+K):
    if A-1<i<B+1:
        T.append(str(i))
for j in range(B+1-K,B+1):
    if A-1<j<B+1:
        T.append(str(j))
S = (sorted(set(T)))
print('\n'.join(S))

Submission status: Wrong Answer

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

T =[]

for i in range(A,A+K):
    if A-1<i<B+1:
        T.append(str(i))
for j in range(B+1-K,B+1):
    if A-1<j<B+1:
        T.append(str(j))
S = (sorted(set(T)))
print('\n'.join(S))

Submission status: Wrong Answer

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

for k in newlist:
    print(k)

Submission status: Wrong Answer

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x<z:
    for n in range(x,min(z,y+1)):
        print(n)

if z<y:
    for n in range(max(z+1,x),y+1):
        print(n)

Submission status: Wrong Answer

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

for n in range(x,min(z,y+1)):
    print(n)

if z<y:
    for n in range(z+1,y+1):
        print(n)

Submission status: Wrong Answer

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

for n in range(x,min(z,y)):
    print(n)

if z<y:
    for n in range(z+1,y+1):
        print(n)

Submission status: Wrong Answer

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

for n in range(x,min(z,y)):
    S.append(n)

if z<y:
    for n in range(z+1,y+1):
        S.append(n)
        
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	k = int(s[2])

	l1 = [a+x for x in range(k) if a+x < b]
	l2 = [b-x for x in range(k) if b-x > a]
	nums = list(set(l1+l2))

	for elm in sorted(nums):
		print(elm)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	k = int(s[2])

	l1 = [a+x for x in range(k) if a+x <= b]
	l2 = [b-x for x in range(k) if b-x >= a]
	nums = set(l1+l2)

	for elm in nums:
		print(elm)

Submission status: Wrong Answer

Solution code:
x=input().split()
x=list(map(int,x))
i=0
while(x[0]+i<x[0]+x[2]):
  print(str(x[0]+i))
  i+=1
i=0
while(x[1]-i>x[1]-x[2]):
  print(str(x[1]-i))
  i+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8                           
                                        
ABK = [int(i) for i in input().split()] 
A, B, K = ABK[0], ABK[1], ABK[2]        
                                        
if (B - A)/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 range(A, B+1):               
    print(i)

Submission status: Wrong Answer

Solution code:
#coding:utf-8                           
                                        
ABK = [int(i) for i in input().split()] 
A, B, K = ABK[0], ABK[1], ABK[2]        
                                        
if B - A > K / 2:                       
  for i in range(A, A+K):               
    print(i)                            
  for i in range(B-K+1, B+1):           
    print(i)                            
                                        
else:                                   
  for i in range(A, B+1):               
    print(i)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
A,B,K = map(int, input().split())

sub = B - A + 1
if K**2 >= sub:
	while True:
		if A > B: break
		print(A)
		A += 1
else:
	C = A + K - 1
	while True:
		if A > C: break
		print(A)
		A += 1
	D = B - K + 1
	while True:
		if D > B: break
		print(D)
		D += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b - k < a:
  b_k = a + 1
else:
  b_k = b - k + 1


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

Submission status: Wrong Answer

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 + 1
else:
  b_k = b - k + 1


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