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

sub1 = [i for i in range(A,A+K)]
sub2 = [i for i in range(B-K+1,B+1)]
sub = set(sub1) | set(sub2)
for i in sub:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(k):
    ans.append(a + i)
    
for i in range(k-1, -1, -1):
    ans.append(b - i)
    
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

Submission status: Wrong Answer

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

for i in range(k):
    ans.append(a + i)
    
for i in range(k-1, -1, -1):
    ans.append(b - i)
    
for i in set(ans):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

l = []
for i in range(a, a + k):
    if i not in l:
        l.append(i)
for i in range(b - k + 1, b + 1):
    if i not in l:
        l.append(i)

ans = '\n'.join(map(str, l))
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, str(input()).split(" "))
disp = []
for i in [j for j in range(A, A + K) if j <= B]:
    disp.append(i)
for i in [j for j in range(B - K + 1, B + 1) if A <= j]:
    disp.append(i)
for i in set(disp):
    print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, str(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())
if (b-a+1)  > k*2:
    for i in range(k):
        print(a+i)
    for i in range(k+1):
        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())
if (b-a) /2  > k:
    for i in range(k):
        print(a+i)
    for i in range(k+1):
        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())
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):
        print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans_array = []

for i in range(A, A + K if B > (A + K) else B):
    ans_array.append(i)

for i in range(B, B - K if A < (B - K) else A, -1):
    ans_array.append(i)

ans_array = sorted(list(set(ans_array)))

for i in ans_array:
    print(i)

Submission status: Wrong Answer

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

ans_array = []

for i in range(A, A + K if B > (A + K) else B):
    ans_array.append(i)

for i in range(B, B - K if A < (B - K) else A, -1):
    ans_array.append(i)

ans_array = sorted(list(set(ans_array)))

print(ans_array)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A+B >= 2*K:
   for up in range(A,A+K):
       print(up)
   for down in range(B-K+1,B+1):
       print(down)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

A, B, K = map(int, input().split())
diff = B - A
if diff <= 2*K:
    for c in range(A, B+1):
       print(c)
else:
    for a in range(A, A+K):
        print(a)
    for b in range(B-K+1, B+1):
        print(b)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

A, B, K = map(int, input().split())
diff = B - A
if diff <= 2*K:
    for i in range(A, B+1):
       print(i)
else:
    for a in range(A, A+K+1):
        print(a)
    for b in range(B-K, B+1):
        print(b)

Submission status: Wrong Answer

Solution code:
A,B,K = list(map(int,input().split()))
if (B-A-1) <= K:
  for i in range(A,B+1):
    print(i)
else:
  for i in range(K):
    print(A+i)
  for i in range(K-1,-1,-1):
    print(B-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 j in range(K):
    if B-K+1 > A+K-1:
        print(B-K+1+j)

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)
if B-K+1 > A:
    for j in range(K):
        print(B-K+1+j)

Submission status: Wrong Answer

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


def main():
    """Function."""
    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)


if __name__ == "__main__":
    main()

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

first = [i for i in range(A, B+1)] if A + K >= B else [i for i in range(A, A+K)]
latter = [i for i in range(B-K, B+1)] if B - K >= A else [i for i in range(A, B+1)]

for i in set(first + latter):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if(A==B and K>=1):
    print(A)
    quit()
elif(A==B and K==0):
    quit()

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

else:

    if(K>B):
        K=B

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

    if(B-K<=0):
        quit()


    for i in range(B-K+1,B+1):
        if(i not in c and i<=B):
            print(i)

Submission status: Wrong Answer

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

if(A==B):
    print(A)
    quit()


if(K>B):
    K=B

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

if(B-K<=0):
    quit()


for i in range(B-K+1,B+1):
    if(i not in c and i<=B):
        print(i)

Submission status: Wrong Answer

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

if(K>B):
    K=B

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

if(B-K<=0):
    quit()


for i in range(B-K+1,B+1):
    if(i not in c and i<=B):
        print(i)

Submission status: Wrong Answer

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

if(K>B):
    K=B-1

for i in range(K):
    print(A+i)
    c.append(A+i)

if(B-K<=0):
    quit()


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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
if len(range(a, b+1)) > k:
    c = [d for d in range(a, b+1)]
else:
    c = [d for d in range(a, b+1)]
    c = set(c[0:k]+c[-k:])
    c = list(c)
for e in c:
    print(e)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
if len(range(a, b+1)) > k:
    c = range(a, b+1)
else:
    c = [d for d in range(a, b+1)]
    c = set(c[0:k]+c[-k:])
    c = list(c)
for e in c:
    print(e)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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,b):
    print(i)

Submission status: Wrong Answer

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

iter_list = list(range(a,a+k+1)) + list(range(b-k, b+1))
cand = sorted(list(set(iter_list)))
for i in cand:
    if a <= i and i <= b:
        print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
res = []
for i in range(a,a+k):
    if i <= b:
        res.append(i)
flag = True
for i in range(b, b-k, -1):
    if i not in res and i >= a:
        if flag:
            res.append(i)
            flag = False
        else:
            res.insert(len(res)-1, i)

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

Submission status: Wrong Answer

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

counter = 1
ans_list = []
for i in range(A,B+1) :
	ans_list.append(i)
	counter += 1
	if (counter > K) :
		break

counter = 1
for i in range(B,A+1,-1) :
	ans_list.append(i)
	counter += 1
	if (counter > K) :
		break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c,b)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(_) for _ in input().split()]
if 2*K < B-A:
    print("\n".join([str(_) for _ in list(range(A,A+K)) + list(range(B-K+1,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))

Submission status: Wrong Answer

Solution code:
A, B, K = [int(_) for _ in input().split()]
if A+K < B-K:
    print("\n".join([str(_) for _ in list(range(A,A+K+1)) + list(range(B-K,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))

Submission status: Wrong Answer

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

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, 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())
l=[]
for i in range(k):
    l.append(a+i)
    l.append(b-i)
l.sort()
for j in set(l):
    print(j)

Submission status: Wrong Answer

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

    for i in range(a, a+k-1):
        s.add(i)

    for i in range(b-k+1, b):
        s.add(i)

    for i in s:
        if a <= i and i <= b:
            print(i)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
l=set()
for i in range(a,a+c):
    if i!=b:l.add(str(i))
    else:break
for i in range(max(b-c+1,a),b+1):
    l.add(str(i))    
print("\n".join(sorted(list(l))))

Submission status: Wrong Answer

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

S = set()
for i in range(A, A+K):
    if i > B:
        break
    S.add(i)
for i in range(B-K+1, B+1):
    if i < A:
        break
    S.add(i)
print(sorted(S))

Submission status: Wrong Answer

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

ans = set([])
for i in range(a, min(a+k, b+1)):
    ans.add(i)
for i in range(max(a, b-k), b):
    ans.add(i)
for a in ans:
    print(a)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
inte = []
if k >= (b-a+1) // 2:
  k = (b-a+1) // 2
for i in range(a,a+k):
  inte.append(i)
for i in range(b-k+1,b+1):
  inte.append(i)
inte2 = sorted(set(inte))
for i in range(len(inte2)):
  print(inte2[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
lis = []
if c >= b-a:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(c):
        lis.append(a+i)
        lis.append(b-i)
    for m in sorted(lis):
        print(m)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
lis = []
if c >= a-b:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(c):
        lis.append(a+i)
        lis.append(b-i)
    for m in sorted(lis):
        print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import deque

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

def bfs(a, b, c):
    cnt = 0
    queue = deque([[a, b, c, cnt]])

    while queue:
        a, b, c, cnt = queue.popleft()
        if a == b and b == c:
            return cnt
        if a >= 60 or b >= 60 or c >= 60:
            return cnt

        if b > a and b > c:
            queue.append([a+1, b, c+1, cnt+1])
        elif a > b and a > c:
            queue.append([a, b+1, c+1, cnt+1])
        elif c > a and c > b:
            queue.append([a+1, b+1, c, cnt+1])
        elif a < b:
            queue.append([a+2, b, c, cnt+1])
        elif b < c:
            queue.append([a, b+2, c, cnt+1])
        elif c < a:
            queue.append([a, b, c+2, cnt+1])

print(bfs(a, b, c))

Submission status: Wrong Answer

Solution code:
from collections import deque

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

def bfs(a, b, c):
    cnt = 0
    queue = deque([[a, b, c, cnt]])

    while queue:
        a, b, c, cnt = queue.popleft()
        if a == b and b == c:
            return cnt
        if a >= 52 or b >= 52 or c >= 52:
            return cnt

        if b > a and b > c:
            queue.append([a+1, b, c+1, cnt+1])
        elif a > b and a > b:
            queue.append([a, b+1, c+1, cnt+1])
        elif c > a and c > b:
            queue.append([a+1, b+1, c, cnt+1])
        elif a < b or a < c:
            queue.append([a+2, b, c, cnt+1])
        elif b < a or b < c:
            queue.append([a, b+2, c, cnt+1])
        elif c < a or c < b:
            queue.append([a, b, c+2, cnt+1])

print(bfs(a, b, c))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in nums[:k]:
    apply_nums.add(i)
for i in nums[-k:]:
    apply_nums.add(i)

apply_list = list(apply_nums)

for i in apply_list:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

lower_list = [i for i in range(a, a + k)]
upper_list = [i for i in range(b, b - k + 1, -1)]

out_list = sorted(set(lower_list + upper_list))
for out in out_list:
    if a <= out <= b:
        print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

int_list = [i for i in range(a, b + 1)]
out_list = set(sorted(int_list[:k] + int_list[-k:]))

for out_val in out_list:
    print(out_val)

Submission status: Wrong Answer

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

int_list = [i for i in range(a, b + 1)]
out_list = set(int_list[:k] + int_list[-k:])

for out_val in out_list:
    print(out_val)

Submission status: Wrong Answer

Solution code:

A,B,K = map(int, input().split())
num = B-A+1
lis = []
ans = []

for i in range(num):
    lis += str(A)
    A += 1

n=0
for j in range(K):
    if j <= B-2:
        ans += lis[j]
        if j == B:
            break
        
num = B-A
for l in range(K):
    if A > l+2:
        ans += lis[num-l]
        if l == A:
            break

uniq_ans = []
for m in ans:
    if m not in uniq_ans:
        uniq_ans.append(m)        

uniq_ans.sort()

for n in uniq_ans:
        print(n)

Submission status: Wrong Answer

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

for i in range(num):
    lis += str(A)
    A += 1

n=0
for j in range(K):
    if j <= B-2:
        ans += lis[j]
        if j == B:
            break
        
num = B-A
for l in range(K):
    if A > l+2:
        ans += lis[num-l]
        if l == A:
            break

uniq_ans = []
for m in ans:
    if m not in uniq_ans:
        uniq_ans.append(m)        

print(uniq_ans)
uniq_ans.sort()

for n in uniq_ans:
        print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = []

for i in range(A, A + K):
    x.append(i)

for i in range(B - K + 1, B + 1):
    x.append(i)

y = set(x)

for i in range(len(y)):
    print(sorted(list(y))[i])

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = []

for i in range(A, A+K):
    ans.append(i)

for j in range(B, B-K, -1):
    ans.append(j)

ans = list(set(ans))
ans.sort()
for x in ans:
    print(x)

Submission status: Wrong Answer

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

ans = []

for i in range(A, A+K):
    ans.append(i)

for j in range(B, B-K, -1):
    ans.append(j)

ans = list(set(ans))
ans.sort()
for x in ans:
    print(ans)

Submission status: Wrong Answer

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

ans = []

for i in range(A, A+K):
    ans.append(i)

for j in range(B, B-K, -1):
    ans.append(j)

ans = list(set(ans))
ans.sort()
print(ans)

Submission status: Wrong Answer

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

ans = []

for i in range(A, A+K):
    ans.append(i)

for j in range(B, B-K, -1):
    ans.append(j)

ans.sort()
print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

R = [A, B]

for k in range(1, K):
    if A + k == B:
        break
    R.append(A + k)

for k in range(1, K):
    if B - k == A:
        break
    R.append(B - k)


R = list(set(R))
R.sort()

for r in R:
    print(r)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
if a+k >= b-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())
L = []
for i in range(K) :
    a = A+i
    b = B-i
    L.append(a)
    L.append(b)
L = list(set(L))
ANSWER = sorted(L)
for j in range(len(ANSWER)) :
    print(ANSWER[j])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if abs(a-b)<=k:
    for i 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: Wrong Answer

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

if abs(a-b)<=k:
    for _ in range(b-a+1):
        print(a)
        a+=1
    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: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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):
  if(A+K>i):
    continue
  print(i)

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-K+1):
  if(A+K>i):
    continue
  print(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


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


def main():
    A, B, K = map(int, input().split())
    ans = set()
    for i in range(A, min(B, A + K)):
        ans.add(i)
    for i in range(B, max(A, B - K), -1):
        ans.add(i)
    for x in sorted(list(ans)):
        print(x)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

l = B - A + 1

if l == 1:
  print(A)
if l == 2:
  print(A)
  print(B)
else:
  if (l+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)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output


def chkprint(*args):
    names = {id(v): k for k, v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg), '???')+' = '+repr(arg) for arg in args))

# Binary converter


def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]

# --------------------------------------------


dp = None


def main():
    A, B, K = li_input()

    C = []

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

    for i in range(B - K + 1, B + 1):
        if i not in C:
            C.append(i)

    for c in C:
        print(c)


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = []
for i in range(a, min(a + k, b + 1)):
    ans.append(i)
for i in range(b, max(b - k, a - 1), -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())
ans = []
for i in range(a, min(a + k, b)):
    ans.append(i)
for i in range(max(a, b - k) + 1, b + 1):
    if i not in ans:
        ans.append(i)
for i in ans:
    print(i)