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:
# -*- coding: utf-8 -*-
data = input().split(" ");
A = data[0];
B = data[1];
K = data[2];

for lop in range(int(A),int(A)+int(K)):
    if lop > int(B):
        break;
    print(lop);
    fg = lop;
        
if int(B)-int(K)+1 >= int(A):
    if fg+1 < int(B)-int(K)+1:
        fg = int(B)-int(K)+1;
    else:
        fg+=1
    for lop in range(fg,int(B)):
        print(lop);
    print(B);

Submission status: Wrong Answer

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

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

for xx in sorted(set(x)):
  print(xx)

Submission status: Wrong Answer

Solution code:
S = input()
s_2 = [int(x) for x in S.split()]

if (s_2[1] - s_2[0]) <= s_2[2]*2:
    for x in range(s_2[1] - s_2[0] + 1):
        print(s_2[0] + x)

else:    

    # upper
    for x in range(s_2[2]):
        ans = s_2[0] + x
        print(ans)

    #lower
    for x in range(s_2[2]):
        ans = s_2[1] - s_2[2] + x +1
        print(ans)

Submission status: Wrong Answer

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

if ((max - min + 1) > 2*K):
    for i in range(min, max+1):
        print(i)

else:
    for i in range(min, min+K):
        print(i)
    for i in range(max-K, max+1):
        print(i)

Submission status: Wrong Answer

Solution code:
import sys
P = []
A,B,K = map(int, input().split())
for i in range(A,min(B,A+K-1)):
  print(i)
  P.append(i)
for i in range(min(B,abs(B-K+1)),B+1):
  if i not in P:
    print(i)

Submission status: Wrong Answer

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

for i in range(k):
    S.add(a + i)

for j in range(k):
    S.add(b - (k - j) + 1)

l = sorted(list(S))

for i in l:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict as dd
from collections import Counter
from pprint import pprint as pp

YN = {True: 'Yes', False: 'No'}
ri = lambda: int(input())
ria = lambda: list(map(int, input().split()))
rian = lambda n: [ria() for _ in range(n)]
rs = lambda: input()
rsa = lambda: input().split()
rsn = lambda n: [rs() for _ in range(n)]

A, B, K = ria()
K = min(K, B-A)
s = set(range(A, A+K))
s |= set(range(B, B-K, -1))
for i in sorted(s):
  print(i)

Submission status: Wrong Answer

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

if a+k<b-k:
    for i in range(a,a+k):
        print(i)
    for i in range(b+1-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())

k = min(b - 1, k)
ans = set()

for i in range(k):
    ans.add(a + i)
    ans.add(b - i)

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

Submission status: Wrong Answer

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

i = A
while i < A + K :
    print(i)
    i += 1

i = B - K + 1
while i <= B :
    print(i)
    i += 1

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
res=[]

if x[0]+x[2]>=x[1]-x[2]:
    for i in range(x[0],x[1]+1):
        print(i)
    quit()

for i in range(x[0],x[0]+x[2]):
    res.append(i)
for i in range(x[1]-x[2]+1,x[1]+1):
    res.append(i)

print(res)

Submission status: Wrong Answer

Solution code:
def main():
    A, B, K = map(int, input().split())
    num = []
    for i in range(A, A + K):
        num.append(i)

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# a = input()
# b = input()
# k = input()
str = input()
str = str.split()
#print(str)
a = int(str[0])
b = int(str[1])
k = int(str[2])
#print("ans")
if b - a >= k*2:
    for i in range(a,a+k):
        print(i)
    print("ss")
    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] = [int(s) for s in input().split()]

if A + K < B - 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:
#!/usr/bin/env python
# coding: utf-8
#

def main(input_str):
    a, b, k = list(map(int, input_str.split(' ')))
    li = []
    for i in range(a, a + k):
        li.append(i)
    for i in range(b + 1 - k, b + 1):
        li.append(i)
    set_li = sorted(list(set(li)))
    for i in set_li:
        print(i)
    
    

if __name__ == '__main__':
    try:
        main(input().strip())
    except EOFError:
        pass

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = f[:k]
ans_d = f[-k:]
half = len(f)//2
if k > half:
    r = k-half
    del ans[-r:]
    del ans_d[:r]
ans += ans_d
for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
res=[]

if x[0]+x[2]>x[1]-x[2]:
    for i in range(x[0],x[1]+1):
        print(i)
    quit()

for i in range(x[0],x[0]+x[2]):
    res.append(i)
for i in range(x[1]-x[2]+1,x[1]+1):
    res.append(i)

print(res)

Submission status: Wrong Answer

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

B += 1
K = min(B-A, K)

ans_F = [x for x in range(A, A+K)]
ans_B = [x for x in range(B-K, B)]

print(sorted(set(ans_F)|set(ans_B)))

Submission status: Wrong Answer

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

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

for j in range(k):
    print (b - (k - j) + 1)

Submission status: Wrong Answer

Solution code:
text = input()

a = int(text.split(' ')[0])
b = int(text.split(' ')[1])
k = int(text.split(' ')[2])

t = min(a + k, b + 1)
for i in range(a, t):
    print(i)

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

Submission status: Wrong Answer

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

num = set()

for i in range(k):
    num.add(a+i)
    num.add(b-i)

num = list(num)
num.sort()

for i in num:
    print(i)

Submission status: Wrong Answer

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

for i in range(0, k):
    x = a + i
    y = b - i
    if i > (b-a)//2+2:
        break
    answer.add(x)
    answer.add(y)
for ans in sorted(list(answer)):
    print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict as dd
from collections import Counter
from pprint import pprint as pp

YN = {True: 'Yes', False: 'No'}
ri = lambda: int(input())
ria = lambda: list(map(int, input().split()))
rian = lambda n: [ria() for _ in range(n)]
rs = lambda: input()
rsa = lambda: input().split()
rsn = lambda n: [rs() for _ in range(n)]

A, B, K = ria()
K = min(K, B-A)
s = set(range(A, A+K))
s |= set(range(B-K+1, B+1))
for i in sorted(s):
  print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
a = []
if K >= (abs(A - B) / 2):
    for i in range(A, B + 1):
        a.append(i)
else:
    for i in range(K):
        a.append(A + i)
        a.append(B - i)
        
a.sort()
for i in range(len(a)):
    print(a[i])

Submission status: Wrong Answer

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

def main(input_str):
    a, b, k = list(map(int, input_str.split(' ')))
    for i in range(a, a + k):
        print(i)
    for i in range(b + 1 - k, b + 1):
        print(i)
    

if __name__ == '__main__':
    try:
        main(input().strip())
    except EOFError:
        pass

Submission status: Wrong Answer

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

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

for j in range(k - 1, -1, -1):
    print (b - j)

Submission status: Wrong Answer

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

for i in range(0, k):
    x = a + i
    y = b - i
    if i > (b-a)/2+1:
        break
    answer.add(x)
    answer.add(y)
for ans in sorted(list(answer)):
    print(ans)

Submission status: Wrong Answer

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

for x in range(a, a+k):
    print(x)

for x in range(b-k+1, b+1):
    print(x)

Submission status: Wrong Answer

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

nums = set()
for i in range(k):
    #print(a)
    nums.add(a)
    a += 1
    if a > b:
        break
for j in range(k):
    #print(b)
    nums.add(b)
    b -= 1
    if a > b:
        break

for k in nums:
    print(k)

Submission status: Wrong Answer

Solution code:
A,B,K = map(int, input().split())
r = [i for i in range(A,B+1)]
num_list = []
for i in r[:K]:
    num_list.append(i)
for i in r[K:]:
     num_list.append(i)
for num in sorted(set(num_list), key=num_list.index):
    print(num)

Submission status: Wrong Answer

Solution code:
text = input()

a = int(text.split(' ')[0])
b = int(text.split(' ')[1])
k = int(text.split(' ')[2])

for i in range(a, a + k):
    print(i)

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

Submission status: Wrong Answer

Solution code:
l = list(map(int, input().split()))
a = l[0]
b = l[1]
c = l[2]

ss = []
ll = []
def checkK(x,y,z):
    if y - x + 1 <= z:
        counter = int(x)
        while counter != y:
            ss.append(counter)
            counter = counter + 1
        for i in range(len(ss)):
            print(ss[i])
    else:
        for i in range(c):
            ll.append(a+i)
        for i in range(c):
            ll.append(b-c+i)
        for i in range(len(ll)):
            print(ll[i])
        
checkK(a,b,c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
text = input()

a = int(text.split(' ')[0])
b = int(text.split(' ')[1])
k = int(text.split(' ')[2])

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())
r = [i for i in range(A,B+1)]

for i in r[:K]:
    print(i)
for i in r[K:]:
    print(i)

Submission status: Wrong Answer

Solution code:
def main():
    A, B, K = map(int, input().split())
    r = set()
    for i in range(A, A + K):
        r.add(i)

    for i in range(B, B - K, -1):
        r.add(i)
    O = list(r)
    O.sort()
    for o in O:
        print(o)


main()

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 = list(map(int, input().split()))

def sol(a,b,k):
    if b-a <= 2*k:
        for i in range(a,b+1):
            print(i)
        return True
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
    return (True)

dummy = sol(a, b, k)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
num1 = range(a, a+k)
num2 = range(b-k+1, b+1)
for num in sorted(list(set(num1) | set(num2))):
    print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=c+1
e=b-a
f=0
g=0
if d==e:
  while e>f:
    print(a)
    a+=1
    f+=1
else:
  while c>f:
    print(a)
    a+=1
    f+=1
    while c>g:
      print(b-1)
      b+=1
      g+=1

Submission status: Wrong Answer

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

for i in range(0, k+1):
    x = a + i
    y = b - i
    if i > (b-a)/2+1:
        break
    answer.add(x)
    answer.add(y)
for ans in sorted(list(answer)):
    print(ans)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
length=B-A+1

if round(length/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,B+1):
		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: Wrong Answer

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

x = a+k if a+k <= b else b
for i in range(0, k):
    x = a + i
    y = b - i
    if i > (b-a)/2+1:
        break
    answer.add(x)
    answer.add(y)
for ans in sorted(list(answer)):
    print(ans)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = f[:k]
print(ans)
ans_d = f[-k:]
ans += ans_d
for i in sorted(set(ans), key=ans.index):
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int, input().rstrip().split()) #input parameters\
output=[] #make list
for i in range(A,B+1):
    if (A<=i and i<A+K) or (B-K<i and i<=B):
        output.append(i)
print(output)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = a+k if a+k <= b else b
for i in range(0, k):
    x = a + i
    y = b - i
    if i > (b-a)/2+1:
        break
    answer.add(x)
    answer.add(y)
for ans in answer:
    print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c  = [int(x) for x in input().strip().split()]

res = {x for seq in [range(a,min(a+c, b)), range(b, max(a,b-c), -1)] for x in seq}

for x in sorted(list(res)):
    print(x)

Submission status: Wrong Answer

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

array = []
array2 = []
for i in range(a, a+k):
    if i > b:
        break
    array.append(i)
for i in range(b-k+1, b+1):
    if i <= 0:
        break
    array2.append(i)

for i in sorted(set(array+array2)):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    a, b, k = list(map(int, input().split()))
    numbers = list()

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

    for j in range(b, min(abs(b - k + 1), abs(b - a + 1)), -1):
        numbers.append(j)

    for i in sorted(set(numbers)):
        print(i)

Submission status: Wrong Answer

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

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

for i in range(k):
    print(b - (k - 1) + 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)
for i in range(K):
    if B - K + i + 1 not in ans and A < B - K + i + 1:
        ans.append(B - K + i + 1)
ans.sort()
for a in ans:
    print(a)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = f[:k]
ans_d = f[-k:]
ans += ans_d
for i in set(ans):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = set()

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

    for i in range(max(A+K, B-K+1), B+1):
        print("b",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 reversed(range(k)):
    print(b-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(1, k+1):
        print(b-k+i)
else:
    for i in range(b-a+1):
        print(a+i)

Submission status: Wrong Answer

Solution code:
A, B, K = (int(x) for x in input().split())
if (A - B) // 2 >= K:
  for x in range(A, A + K):
    print(x)
  for x in 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 = [int(i) for i in input().split()]
answer = set()

x = a+k if a+k <= b else b
for i in range(a, x):
    answer.add(i)
y = b-k if b >= k else 0
for j in range(x, b+1):
    answer.add(j)
for ans in answer:
    print(ans)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ans = []
for i in range(A,min(B+1,A+K+1),1):
    if i not in ans:
        ans.append(i)
for j in range(B,max(A-1,B-K-1),-1):
    if j not in ans:
        ans.append(j)
ans = sorted(ans)
for k in ans:
    print(k)

Submission status: Wrong Answer

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

for i in range(K):
    upnum = A + i
    if upnum < B:
        anslist.add(upnum)

    downnum = B - i
    if downnum > A:
        anslist.add(downnum)

sortedlist = sorted(anslist)

for n in sortedlist:
    print(n)

Submission status: Wrong Answer

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

array = [int(x) for x in range(a, a+k)]
array2 = [int(x) for x in range(b-k+1, b+1)]

if k > b-a+2:
    for i in range(a, b+1):
        print(i)
else:
    for i in sorted(set(array+array2)):
        print(i)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = []
for i in range(min(k, b)):
    if a+i > b: break
    ans.append(a+i)
for i in range(min(k, a)):
    if b-k+i+1 < a: continue
    ans.append(b-k+i+1)
ans = sorted(set(ans))
[print(aa) for aa in ans]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ret = []
for i in range(a, a + k):
    ret.append(i)

for i in range(b - k + 1, b + 1):
    ret.append(i)

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

Submission status: Wrong Answer

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

if B-A<=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: 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())
ans = []
for i in range(A,min(B,A+K),1):
    if i not in ans:
        ans.append(i)
for j in range(B,max(A,B-K),-1):
    if j not in ans:
        ans.append(j)
ans = sorted(ans)
for k in ans:
    print(k)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
import sys
if B < K:
    for i in range(A, B+1):
        print(i)
    sys.exit()
tmp = []
for i in range(A, A+K):
    print(i)
    tmp.append(i)
for j in range(B-K+1, B+1):
    if j in tmp:
        continue
    print(j)

Submission status: Wrong Answer

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

t = []

for i in range(k):
    t.append(i+a)

for i in range(k):
    t.append(b-i)

y = list(set(t))

for x in sorted(y):
    print(x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

z = []

for x in range(a,a+k):
  if x == b:
    break
  z.append(x)

for x in range(b,b-k,-1):
  if x == a:
    break
  z.append(x)

z = list(set(z))
z.sort()

for x in z:
  print x

Submission status: Wrong Answer

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

if K > (B-A)/2:
    for i in range(A, B+1):
        print(i)
else:
    for j in range(A, A+K):
        print(j)
    for j in range(B-1, B+1):
        print(j)

Submission status: Wrong Answer

Solution code:
a,b,k=list(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(" "))

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

Submission status: Wrong Answer

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

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

for i in range(max(A+K, B-K+1), B+1):
    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)
    s.append(b-i)
s=sorted(list(set(s)))
for i in range(len(s)):
    print(s[i])

Submission status: Wrong Answer

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

list = []

for i in range(k):
    list.append(i+a)

for i in range(k):
    list.append(b-i)

for x in set(list):
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

list = []

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

for i in range(k):
    list.append(b-i)

for x in list:
    print(x)

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:
f = lambda :[int(i) for i in input().split()]
from sys import stderr
debug = lambda x:stderr.write(repr(x)+'\n')

a,b,k = f()
if a + k * 2 >= b:
    for i in range(a,b+1):
        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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
l = [i for i in range(A, B+1)]
del l[K:-K]
print(*l, sep='\n')

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
 
def main():
    a,b,k = map(int,input().rstrip().split())
    numbers=[i for i in range(a,b+1)]
    A=set(numbers[:k])
    B=set(numbers[-k:])
    answers = A|B
    
    for i in sorted(answers):
        print("{}".format(i))
 
 
if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8


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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

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

for i in sorted(set(l[:K] + l[::-1][:K][::-1])):
    print(i)

Submission status: Time Limit Exceeded

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

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

ans = sorted(set(l[:K] + l[::-1][:K][::-1]))

for i in ans:
    print(i)

Submission status: Time Limit Exceeded

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

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

for _r in r:
    print(_r)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from collections import OrderedDict

A, B, K = map(int, input().split())
L = []
res = []

if K > B-A:
    for i in range(A, B+1):
        print(i)
    exit()
else:
    for i in range(A, B+1):
        L.append(i)
    for i in range(0, K):
        res.append(L[i])
    for i in range(len(L)-K, len(L)):
        res.append(L[i])

res_unique = list(set(res))
res_unique.sort()

for i in res_unique:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
from collections import OrderedDict

A, B, K = map(int, input().split())
L = []
res = []

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

if K > B-A:
    for i in L:
        print(i)
    exit()
else:
    for i in range(0, K):
        res.append(L[i])
    for i in range(len(L)-K, len(L)):
        res.append(L[i])

res_unique = list(set(res))
res_unique.sort()

for i in res_unique:
    print(i)

Submission status: Time Limit Exceeded

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

if 2*k >= b-a+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: Time Limit Exceeded

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

if 2*k >= b-a+1:
  for i in lis:
    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: Time Limit Exceeded

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

if k >= len(lis):
  for i in lis:
    print(i)
else:
  lis3 = lis[:k]
  lis4 = lis[len(lis)-k:]
  lis2_set = set(lis3+lis4)
  lis2_set_sort = sorted(lis2_set)
  for i in lis2_set_sort:
    print(i)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a,b,k=map(int,input().split())
d=[i for i in range(a,b+1)]
n=len(d)
if n>=2*k:
  ans=[0]*(2*k)
  for i in range(k):
    ans[i]=d[i]
    ans[2*k-1-i]=d[n-1-i]
  for j in ans:
    print(j)
  exit()
elif n<2*k:
  for i in range(n):
    print(d[i])
  exit()