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(k):
    if a <= a+i <= b:
        ans.append(str(a+i))
    if a <= b-i <= b:
        ans.append(str(b-i))
for i in (sorted(set(ans))):
    print(i)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int,input().split())
ans = []
for i in range(k):
    if a <= a+i <= b:
        ans.append(str(a+i))
    if a <= b-i <= b:
        ans.append(str(b-i))
print("\n".join(sorted(list(set(ans)))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
L = []
for i in range(min(K , B - A)):
  L.append(A + i)
  L.append(B - i)
L = list(set(L))
L.sort()
for j in range(len(L)):
  print(L[j])

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
if K >= (B - A + 1)//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())
ans=[]
num_min=a+k
num_max=b-k+1
if b-a+1<=2*k:
    for i in range(a,num_min):
        ans.append(i)
    for i in range(num_max,b+1):
        ans.append(i)
else:
    for i in range(a,b+1):
        ans.append(i)
ans=sorted(set(ans))
for i in ans:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if (a+c-1)>(b-c-1):
  for i in range(c):
    print(a+i)
  for i in range(c):
    print(b-c+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())

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

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

for i in ans:
    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-i:
        ans.append(a+i)
        ans.append(b-i)

ans.sort()

for a in ans:
    print(a)

Submission status: Wrong Answer

Solution code:
a,b,n=map(int,input().split())
Alist = list(range(a,min(a+n,b+1),1))
Blist = list(range(max(a,b-n+1),b+1,1))
C = set(Alist)|set(Blist)
for i in list(C):
  print(i)

Submission status: Wrong Answer

Solution code:
a,b,n=map(int,input().split())
Alist = list(range(a,min(a+n,b),1))
Blist = list(range(max(a,b-n+1),b+1,1))
C = set(Alist)|set(Blist)
for i in list(C):
  print(i)

Submission status: Wrong Answer

Solution code:
a,b,n=map(int,input().split())
Alist = list(range(a,min(a+n,b),1))
Blist = list(range(max(a,b-n)+1,b+1,1))
C = set(Alist)|set(Blist)
for i in list(C):
  print(i)

Submission status: Wrong Answer

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

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

for _r in r:
    print(_r)

Submission status: Wrong Answer

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

ans = []

for i in [t for t in range(a, b)][:k]:
    ans.append(i)

for i in [t for t in range(b, a, -1)][:k]:
    ans.append(i)

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, 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())
li = []
[li.append(i) for i in range(a,b+1)]
ans = []
if len(li) < k:
    k = len(li) 
for num in range(k):
    
    ans.append(li[num])
    if num == 0:
        ans.append(li[num-1])
    else:
        ans.append(li[(num*-1)-1])
ans.sort()
ans = list(set(ans))
[print(j) for j in ans]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
a=input().split(' ')
A=int(a[0])
B=int(a[1])
K=int(a[2])
if B-A+1<=K/2:
  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+1+i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = set()
k = min(k,b-a)
for i in range(a, a+k):
    ans.add(i)

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

ans=sorted(list(ans))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for num in range(A, A+K):
    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())
k=min(k,b-a)
*al,=range(a,a+k)
*al2,=range(b-k+1,b+1)
ans=al+al2
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())
k=min(k,b-a)
*al,=range(a,a+k+1)
*al2,=range(b-k,b+1)
ans=al+al2
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())
x = [i for i in range(a, min(a + k, b + 1))]
y = [i for i in range(max(a, b - k + 1), b + 1)]
for i in set(x + y):
  print(i)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ans = set([])
for i in range(a,a+k):
    ans.add(i)
for i in range(b-k+1,b+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())
SA = list(range(A, min(B, A + K)))
SB = list(range(max(A, B - K) + 1, B + 1))

ans = sorted(list(set(SA + SB)))
for a in ans:
    print(a)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
SA = list(range(A, min(B, A + K)))
SB = list(range(max(A, B - K) + 1, B + 1))

ans = sorted(set(SA + SB))
for a in ans:
    print(a)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
l = [l for l in range(a,b+1)]
l = set(l[:k]+l[-k:])
for i in l:
    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 = map(int, input().split())

for i in range(k):
    if a + i > b:
        break
    print(a + i)

start = max(a+k-1, b-k+1)

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

Submission status: Wrong Answer

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

for i in range(k):
    if a + i > b:
        break
    print(a + i)

start = max(a, b-k)

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

Submission status: Wrong Answer

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

for i in range(k):
    if a + i > b:
        break
    print(a + i)

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

Submission status: Wrong Answer

Solution code:
from math import ceil
a, b, k = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m,k=map(int,input().split())
l=list(range(n,n+k))
d=list(range(m-k+1,m+1))
s=l+d
s=list(set(s))
s.sort()
for i in s:
    print(i)

Submission status: Wrong Answer

Solution code:
n,m,k=map(int,input().split())
l=list(range(n,n+k))
d=list(range(max(n,m-k+1),m+1))
s=l+d
s=list(set(s))
s.sort()
for i in s:
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
C=[]
D=[]
for i in range(K):
    C.append(A+i)
for i in range(K):
    D.append(B-i)
E=C+D
E.sort()
F=list(set(E))
for i in range(len(F)):
    print(F[i])

Submission status: Wrong Answer

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

for i in range(a,b+1):
  num.append(i)
  
if k*2>=len(num):
  for i in num:
    print(i)

else:
  numb=num[:k]+num[len(num)-2:]
  for i in numb:
    print(i)

Submission status: Wrong Answer

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

num_list = [i for i in range(A, B+1)]
ans_list1 = num_list[:K]
ans_list2 = num_list[-K:]

ans_list = list(set(ans_list1 + ans_list2))

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

Submission status: Wrong Answer

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

num_list = [i for i in range(A, B+1)]
ans_list1 = num_list[:K]
ans_list2 = num_list[-K:]

ans_list = list(set(ans_list1 + ans_list2))

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

Submission status: Wrong Answer

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

print(sorted(set(r[:k]) | set(r[-k:])))

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

ans = []
for i in range(a, b+1):
  if i <= a+k or i>=b-k:
    if i not in ans:
      ans.append(i)
      print(i)

Submission status: Wrong Answer

Solution code:
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-min(a,k)+1,b+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())
ans=set()

for i in range(a,min(b,a+k)+1):
  ans.add(i)
for i in range(b-min(a,k)+1,b+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())
t = []
for i in range(a,a+k):
    t.append(i)
for i in range(b-k+1,b+1):
    t.append(i)
t = list(set(t))
t.sort()
for i in range(len(t)):
    print(t[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

lst = sorted(list(set(lst1 + lst2)))

for i in lst:
    print(i)

Submission status: Wrong Answer

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

for i in set(l[-k:] +l[:k]):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)
ans_list = sorted(list(ans))
for a in ans_list:
    print(a)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
from collections import defaultdict


def read():
    A, B, K = list(map(int, input().strip().split()))
    return A, B, K


def solve(A, B, K):
    ans = defaultdict(bool)
    for a in range(A, min(A+K, B+1)):
        ans[a] = True
    for b in range(B, max(A-1, B-K), -1):
        ans[b] = True
    for a in ans.keys():
        print(a)


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b, x = rm()
set_ = set()
for i in range(x):
    set_.add(a + i)
    set_.add(b - i)
li = sorted(list(set_))
for i in li:
    print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

nums = []
for i in range(a, min(b,a+k)): nums.append(i)
for i in range(b, max(0,b-k), -1): nums.append(i)
for i in sorted(set(nums)): print(i)

Submission status: Wrong Answer

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

a, b, k = inintm()

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

l = b-k+1
cnt = 0

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

Submission status: Wrong Answer

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

a, b, k = inintm()

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

l = b-k+1
cnt = 0

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

Submission status: Wrong Answer

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

a, b, k = inintm()

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

l = b-k+1
cnt = 0

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
A=[]
for i in range(a,a+k):
    A.append(i)
B=[]
for i in range(b,b-k,-1):
    B.append(i)
C=list(set(A+B))
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

for j in range(K):
    dammy = B-K+1+j
    if A+K-1<dammy and 0<dammy and dammy<=B:
        print(dammy)

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

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

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if k > t-b:
  k = t-b
  
while b<=t:
  if b < a + k or (t-k < b <= t):
    print(b)
  b += 1

Submission status: Wrong Answer

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

a = b
while b<=t:
  if b <= a + k or t-k <= b <= t:
    print(b)
  b += 1

Submission status: Wrong Answer

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

a = b
while b<=t:
  if a <= b or t-a <= b <= t:
    print(b)
  b += 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if K < len(abl):
    for j in abl[:K-1]:
        print(j)
    
    for k in abl[-K:]:
        print(k)
else:
    for j in abl[:K-1]:
        print(j)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
List=[]
for i in range(K):
  List.append(A+i)
  List.append(B-i)
s_l=set(List)
NewList=list(s_l)
NewList.sort()
for i in NewList:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    for i in num:
        print(i)

Submission status: Wrong Answer

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

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

    num = set(num)

    for i in num:
        print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
N = []
if B-A>K:
  for i in range(A, A+K):
    N.append(i)
  for i in range(B-K, B+1):
    if not i in N:
      N.append(i)
  print(i)
else:
  for i in range(A, B+1):
    if i < A + K:
      print(i)
    elif i > B-K:
      print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
N = []
if B-A>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):
    if i < A + K:
      print(i)
    elif i > B-K:
      print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
if A + K >= B:
  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+1):
    print(i)

Submission status: Wrong Answer

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

L = list(range(A, min(B+1, A+K+1))) + list(range(max(A, B-K+1), B+1))
L_no_duplication = set(L)
print(*sorted(L_no_duplication), sep="\n")

Submission status: Wrong Answer

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

L = list(range(1, K+1)) + list(range(B-K+1, B+1))
L_no_duplication = set(L)
print(*sorted(L_no_duplication), sep="\n")

Submission status: Wrong Answer

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

ax = [i for i in range(A,A+K)]
bx = [i for i in range(B-K+1,B+1)]

sum = sorted(list(set(ax + bx))) 

for i in sum:
    print(i)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
nums = [int(w) for w in input().split()]
 
nums.sort()
ans = 0
if (nums[1]-nums[0]) % 2 == 1:
    nums[0] -= 1
    ans += 1
 
ans += (nums[1]-nums[0])//2
ans += nums[2]-nums[1]
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if b-a+1>=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:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, k = i_map()

    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())
K = min(K, B - A)
res = set()
for i in range(K):
    res.add(A + i)
    res.add(B - i)
res = sorted(list(res))
print(*res, sep='\n')

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
K = min(K, B - A)
res = set()
for i in range(K):
    res.add(A + i)
    res.add(B - K + 1 + i)
res = sorted(list(res))
print(*res, sep='\n')

Submission status: Wrong Answer

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

for n in range(A,B+1):
  L.append(n)
  
ans = set(L[:K]+L[-K:])
  
print(*ans,sep="\n")

Submission status: Wrong Answer

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

n = [i for i in range(A, B+1)]

if len(n) <= K*2:
    for j in range(len(n)):
        print(n[j])
else:
    for j in range(K):
        print(n[j])
    for j in reversed(range(len(n)-K,len(n))):
        print(n[j])

Submission status: Wrong Answer

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

n = [i for i in range(A, B+1)]

if len(n) < K*2:
    for j in range(len(n)):
        print(n[j])
else:
    for j in range(K):
        print(n[j])
    for j in reversed(range(len(n)-K,len(n))):
        print(n[j])

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

L = set()
for i in range(min(K, B-A)):
    L.add(A+i)
    L.add(B-i)
L = sorted(list(L))
for i in range(len(L)):
    print(L[i])

Submission status: Wrong Answer

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

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

t = list(set(t))
t.sort()

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

Submission status: Wrong Answer

Solution code:
def main():
  a,b,k = list(map(int,input().split()))
  ans=[]
  for i in range(0,k):
    if b-i>=a:
      ans.append(a+i)
      ans.append(b-i)

  ans=list(set(ans))
  
  for i in range(0,len(ans)):
    print(ans[i])
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

A,B,K = list(map(int,input().split()))
num_lis = []
for i in range(A,A+K):
    if i <= B:
        num_lis.append(i)
    else:
        break
    
for i in range(B,B-K,-1):
    if i>= A:
        num_lis.append(i)
    else:
        break
b = sorted(list(set(num_lis)))
print(b)

Submission status: Wrong Answer

Solution code:
import sys
A,B,K = map(int,input().split())
if not (1 <= A <= B <= 10 ** 9):
    sys.exit()
if not (1 <= K <= 100):
    sys.exit()

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

array_result = []
array_result = array_base[0:K] + array_base[-K:]
for I in set(array_result):
    print(I)