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_set = set()

for num in range(k):
    if a + num <= b:
        ans_set.add(a + num)

for num in range(k):
    num = k - num - 1
    if b - num >= a:
        ans_set.add(b - num)
for num in ans_set:
    print(num)

Submission status: Wrong Answer

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

for num in range(k):
    print(a + num)
for num in range(k):
    num = k - num - 1
    print(b - num)

Submission status: Wrong Answer

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

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

for i in range(b-k+1, b+1):
    if i not in ans:
        ans.append(i)
    
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = []
for i in range(k):
    ans.append(a+i)
    ans.append(b-i)
    
ans = sorted(set(ans))
for i in ans:
    print(i)

Submission status: Wrong Answer

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

k = min(k, (b-a)-k)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split());s=set()
for i in range(k):
 s.add(a+i);s.add(b-i)
print(*sorted(s))

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
for i in sorted((set(range(a,a+k))|set(range(b-k,b)))&set(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(B - A + 1):
        print(A + i)

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

for i in sorted(set(A + i for i in range(K)) | set(B - i for i in range(K))):
    print(i)

Submission status: Wrong Answer

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

for i in lis[:k]:
  print(i)
for i in lis[k:]:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

a,b,k=MI()
u=[]
ans=[]
for i in range(a,a+k):
    u.append(i)
for j in range(b-k+1,b+1):
    u.append(j)
for s in u:
    if a<=s<=b:
        ans.append(s)
printni(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

li = []
for i in range(a, a+k):
    if i > b:
        break
    li.append(i)
for i in range(b, b-k, -1):
    if i < a:
        break
    li.append(i)
li.sort()
set_li = set(li)
for i in set_li:
    print(i)

Submission status: Wrong Answer

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

li = []
for i in range(a, a+k):
    li.append(i)
for i in range(b, b-k, -1):
    li.append(i)
li.sort()
set_li = set(li)
for i in set_li:
    print(i)

Submission status: Wrong Answer

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

aa = list(range(a,min(a+k,b)))
bb = list(range(max(b-k+1,a),b+1))
aa.extend(bb)
c = set(aa)
d = list(c)
for i in range(len(d)):
    print(d[i])

Submission status: Wrong Answer

Solution code:
# ABC093B

a, b, k = 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+1), b+1):
    ans.add(i)
print(sorted(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

for i in set(L):
    print(i)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

    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:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

    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:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

    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:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

    for i in range(a, a+k+1):
        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())
ks=[]
for i in range(K):
    ks.append(A+i)
    ks.append(B-i)
new_ks=list(set(ks))
new_ks.sort()
for i in range(len(new_ks)):
    print(new_ks[i])

Submission status: Wrong Answer

Solution code:
import sys
from collections import Counter
readline = sys.stdin.buffer.readline
MOD = 10**9+7

def main():
    A, B, K = map(int, readline().split())
    left = set(list(range(A, min(A+K, B+1))))
    right = set(list(range(B, max(B-K, A-1), -1)))
    ans = left | right
    for i in ans:
        print(i)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding:utf-8
a, b, k = map(int, input().split())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print('\n'.join(map(str,set(min_li+max_li))))

Submission status: Wrong Answer

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

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

print('\n'.join(map(str,min_li+max_li)))

Submission status: Wrong Answer

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

s = set()
for x in range(a,min(a+k,b)):
    s.add(x)
for x in range(b,max(a,b-k),-1):
    s.add(x)

l = [x for x in s]
l.sort()
for x in l:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

url = "https://atcoder.jp//contests/abc093/tasks/abc093_b"

def main():
    f, t, no = list(map(int, input().split()))
    nums = [i for i in range(f, t + 1)]
    ans = set()
    no = len(nums) if no > len(nums) else no
    for i in range(no):
        ans.add(nums[i])
    for i in range(no * -1, 0, 1):
        ans.add(nums[i])

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

def main2():
    f, t, no = list(map(int, input().split()))
    ans = set()
    if t - f < no:
        no = t - f
    for i in range(f, f + no):
        ans.add(i)
    for i in range((t + 1) - no, t + 1):
        ans.add(i)
    for a in sorted(ans):
        print(a)

if __name__ == '__main__':
    main2()

Submission status: Wrong Answer

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

a = set(range(A,min(A+K, B)))
b = set(range(B,max(B-K,A),-1))
a = sorted(a|b)

for i in a:
    print(i)

Submission status: Wrong Answer

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

a = set(range(A,A+K))
b = set(range(B,B-K,-1))
a = sorted(a|b)

for i in a:
    print(i)

Submission status: Wrong Answer

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

a = list(range(A,A+K))
b = list(range(B,B-K,-1))
a = sorted(a+b)

for i in a:
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split(" "))
List = [i for i in range(A,B+1)]
la = List[:K]
lb = List[-K:]
L = la+lb

for l in set(L):
    print(l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = [i for i in range(a, b+1)]
xx = list(set(x[:k] + x[-2:]))
for xi in xx:
  print(xi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import deque
def main():
    A, B, K = map(int, input().split())
    number = list()
    for i in range(A, B+1):
        number.append(i)
    res = 0
    if len(number) < K:
        res = number[:]
    elif len(number) > K:
        res = number[:K] + number[-(K-1):]
    else:
        res = number[:]

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

Submission status: Wrong Answer

Solution code:
from collections import deque
def main():
    A, B, K = map(int, input().split())
    number = list()
    for i in range(A, B+1):
        number.append(i)
    res = 0
    if len(number) < K:
        res = number[:]
    else:
        res = number[:K] + number[-(K-1):]

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

Submission status: Wrong Answer

Solution code:
def myAnswer(A:int,B:int,K:int) -> int:
   if(B >= K):
      ans = [i for i in range(A,A+K)]
      for i in range(B,B-K,-1):
         ans.append(i)
   else:
      ans = [i for i in range(A,B+1)]
   ans = list(set(ans))
   ans.sort()
   for a in ans:
      print(a)

   

def modelAnswer():
   tmp=1
def main():
   A,B,K = map(int,input().split())
   myAnswer(A,B,K)

if __name__ == '__main__':
   main()

Submission status: Wrong Answer

Solution code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

a,b,k = map(int,input().split())
ans = []
if b-a<=k:
    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 = set(ans)
    ans = list(ans)
    ans.sort()
    print(ans)

Submission status: Wrong Answer

Solution code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

upper = min(a + k, b + 1)
bottom = max(b - k, upper)

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)

Submission status: Wrong Answer

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

upper = min(a + k, b + 1)
bottom = min(max(b - k, upper), a + k, )

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)

Submission status: Wrong Answer

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, K = il()
    ret = set()
    for n in range(A, min(A+K+1, B+1)):
        ret.add(n)
    for n in range(max(B-K-1, A), B+1):
        ret.add(n)
    ret = sorted(ret)
    print(*ret, sep="\n")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if k > b-a:
    k = b-a
print('\n'.join(map(str,sorted(set(range(a,a+k)) | set(range(b-k+1,b+1))))))

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

a, b, k = iim()
l = []
if b-a-1 > k:
    for i in range(a,a+k):
        l.append(i)
    for j in range(b-k+1,b+1):
        l.append(j)
else:
    for n in range(a,b+1):
        l.append(n)

for k in l:
    print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if k > b-a:
    k = -(b-a)//2*-1
print('\n'.join(map(str,sorted(set(range(a,a+k)) | set(range(b-k+1,b+1))))))

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

tmp=a if b<k else b-k+1 
for i in range(tmp, b+1):
    if i not in l:
        print(i)

#print(l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for _ in range(k):
    if len(list_ANS) != 0:
        a = list_ANS.pop(0)
        print(a)
    else:
        break
list_A = []
for _ in range(k):
    if len(list_ANS) != 0:
        b = list_ANS.pop(-1)
        list_A.append(b)
    else:
        break
if len(list_ANS) != 0:
    list_A.reverse()
    for i in list_A:
        print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if abs(A - B) >= 2 * K:
  for j in reversed(range(min(K, B - A))):
    print(B - j)
else:
  for j in reversed(range(min(K-1, B - A))):    
    print(B - j)

Submission status: Wrong Answer

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

for i in range(K):
  print(A + i)
  
for j in reversed(range(K)):
  print(B - j)

Submission status: Wrong Answer

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

ans=[]

for i in range(a,a+k):
  if i<=b:
    ans.append(i)
  
for i in range(b-k-1,b+1):
  if i>=a and i not in ans:
    ans.append(i)
    
ans.sort()

for a in ans:
  print(a)

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)
  if B - i > A:
    ans.append(B - i)
ANS = list(set(ans))
ANS.sort()
[print(j) for j in ANS]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
#import collections
a, b, k = list(map(int, input().split()))
l = []

if k > b-a:
    k = b-a

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


ans = list(set(l))
ans.sort()
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

Solution code:

import math
import itertools
import statistics
#import numpy as np
#import collections
a, b, k = list(map(int, input().split()))
l = []

if k > b-a:
    k = b-a

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

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

for i in range(len(ans)):
    print(ans[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 i > a+k-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:
A, B, K = map(int, input().split())
x1 = set(range(A, A+K))
x2 = set(range(B, B-K, -1))
x = x1 | x2
ans = sorted(x)
for i in ans:
    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:
A, B, K = map(int, input().split())
if B - A <= 2 * K:
    for i in range(A, B + 1):
        print(i)
    exit()

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

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)
    exit()
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>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())
L = []
for i in range(min(K,A+B//2)):
  L.append(A+i)
for i in range(min(K,A+B//2)):
  L.append(B-i)
L = sorted(list(set(L)))
for i in L:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

ans1=set()
ans2=set()
for i in range(k):
	ans1.add(a+i)

for i in reversed(range(k)):
	ans2.add(b-i)

lists=list(ans1&ans2)
lists.sort()
for i in lists:
	print(i)

Submission status: Wrong Answer

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

s=set()

for i in range(K):
  s.add(A+i)
  s.add(B-i)
#print(s)

lis=sorted(s)
print(lis)

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:
    ans.append(i)
  if i >= B-K:
    ans.append(i)
    
for i in sorted(set(ans)):
    print(i)

Submission status: Wrong Answer

Solution code:
def Small_and_Large(a , b , k):

    ans = []

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

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

    return ans

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

    for i in ans:
        print(i)


if __name__ == '__main__':
    main()