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())
if 2*K<B-A:
    S = [i for i in range(A,A+K)]+[i for i in range(B-K+1,B+1)]
else:
    S = [i for i in range(A,B+1)]
for s in S:
    print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
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())

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	A, B, K = map(int, input().split(" "))
	
	tmp = -1
	e = min(B, A+K)
	for i in range(A, e):
		print(i)
		tmp = i
	
	s = max(tmp+1, B-K+1)
	for i in range(s, B+1):
		print(i)
			
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
anslist = []
for i in range(0, K):
	if A+i in anslist or B < A+i:
		break
	if B-i in anslist or B-i < A:
		break
	anslist.append(A+i)
	anslist.append(B-i)
anslist.sort()
for i in range(0, len(anslist)):
	print(anslist[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
#ABC93 B

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
mi, ma, num = map(int,input().split())
ans = []
for i in range(mi,mi+num):
  print(i)
for j in range(ma-num+1,ma+1):
  print(j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m  = min(A+K, B+1)
for i in range(A, m):
    print(i)
n = max(A+K+1, B-K+1)
for j in range(n, B+1):
    print(j)

Submission status: Wrong Answer

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

m  = min(A+K+1, B+1)
for i in range(A, m):
    print(i)
n = max(A+K+1, B-K, B)
for j in range(n, B+1):
    print(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 B-i <= K:
        print(i)

Submission status: Wrong Answer

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

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:
    
    l1=[i for i in range(a,b+1)] 
    l2=[]
    for i in range(k):
        l2.append(l1[i])
    for i in range(b-a-k+1,b-a+1):
        l2.append(l1[i])

    l2.sort()
    for i in range(len(l2)):
        print(l2)

Submission status: Wrong Answer

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

    l1=[i for i in range(a,b+1)] 
    l2=[]
    for i in range(k):
        l2.append(l1[i])
    for i in range(b-a-k+1,b-a+1):
        l2.append(l2[i])

    l_set = list(set(l2))
    l_set.sort()
    for i in range(len(l_set)):
        print(l_set[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(b-a+1):
  print(a+i)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

A,B,K = list(map(int,input().split(" ")))
ans = []
for i in range(K):
    if A<=A+i<=B:
        ans.append(A+i)
    if A<=A-i<=B:
        ans.append(B-i)
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import time
import re
import math

def main():
    A,B,K = map(int,input().split())
    ls=[]
    for a in range(K):
        ls.append(A + a)
        ls.append(B - K +1+ a)
    ls=set(ls)
    ls=sorted(ls)
    for a in ls:
        print(a)
main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import time
import re
import math

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

main()

Submission status: Wrong Answer

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

num = []

for i in range(K):
    if A+i <+ B:
        num.append(A+i)
    if B-i >= A:
        num.append(B-i)

ans = set(num)

for s in ans:
    print(s)

Submission status: Wrong Answer

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

num = []

for i in range(K+1):
    if A+i <+ B:
        num.append(A+i)
    if B-i >= A:
        num.append(B-i)

num.sort()
ans = set(num)

for s in ans:
    print(s)

Submission status: Wrong Answer

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

num = []

for i in range(K+1):
    if A+i <+ B:
        num.append(A+i)
    if B-i >= A:
        num.append(B-i)
    
ans = set(num)

for s in ans:
    print(s)

Submission status: Wrong Answer

Solution code:
# a以上b以下の整数で小さい方からk番目以内であるか、大きい方からk番目以内である
a,b,k = map(int, input().split())
arr = []
arr.append(a)
arr.append(b)

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

arr = set(arr)
arr = sorted(arr)

print(arr)

Submission status: Wrong Answer

Solution code:
# a以上b以下の整数で小さい方からk番目以内であるか、大きい方からk番目以内である
a,b,k = map(int, input().split())
arr = []
arr.append(a)
arr.append(b)

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

arr = sorted(arr)
print(arr)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = []
for i in range(k):
    if i+a <= b:
        ans.append(i+a)
    if b-i >= a:
        ans.append(b-i)
ans.sort()
unique_ans = list(dict.fromkeys(ans))
for i in unique_ans:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(x) for x in input().split()]
cnt = 0
for i in range(A, B+1):
    if cnt < K or B-K-2 <= cnt:
        print(i)
    cnt += 1

Submission status: Wrong Answer

Solution code:
A, B, K = [int(x) for x in input().split()]
cnt = 0
rev_cnt = B-3
for i in range(A, B+1):
    if cnt < K or rev_cnt < K:
        print(i)
    cnt += 1
    rev_cnt -= 1

Submission status: Wrong Answer

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

li1 = [i for i in range(a,a+k) if i <= b]
li2 = [i for i in range(b+1-k,b+1) if i >= a]

li1.extend(li2)
li1 = set(li1)

for i in li1:
    print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
length = b+1 -a
index = []

for i in range(length):
    if i <= k-1:
        index.append(i)
    else:
        break
        
for i in range(length-1, 1, -1):
    if length-1-i<=k-1 and i not in index:
        index.append(i)
    else:
        break

index = sorted(index)
for i in index:
    print(a+i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in ans:
	print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(x) for x in input().split()]
#X = list(range(A, B+1))

Submission status: Wrong Answer

Solution code:
a, b, k = list(map(int, input().split()))
arr = [str(i) for i in range(a, b+1)]
if (b-a)*2 < k:
  print(' '.join(arr))
  exit()
result = arr[:k] + arr[len(arr)-k:]
print(' '.join(sorted(set(result))))

Submission status: Wrong Answer

Solution code:

a, b, k = [ int(v) for v in input().split() ]

a_list =  [ i for i in range(a,min(a+k,b+1)) ]
b_list =  [ i for i in range(max(a,b+1-k),b+1) ]

print(sorted(list(set((a_list+b_list)))))

Submission status: Wrong Answer

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

l = []
for num in range(a, a+k):
  if num <= b:
    l.append(num)
  else:
    break

start = b-k if b-k >= a else a
for num in range(start, b+1):
  if not num in l:
    l.append(num)

for num in l:
  print(num)

Submission status: Wrong Answer

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

for num in sorted(numList, reverse=True):
  if not num in l:
    l.append(num)

for num in l:
  print(num)

Submission status: Wrong Answer

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

ansList = numList[:k] + numList[-k:]
for num in list(set(ansList)):
  print(num)

Submission status: Wrong Answer

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

ls = [int(x) for x in range(a,b+1)]

if 2*k >= b-a:
    for i in ls:
        print(i)

else:
    lss = ls[0:k]
    lse = ls[(b-a)-(k-1):]

    lis = lss + lse

    for i in lis:
        print(i)

Submission status: Wrong Answer

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

ls1 = [int(x) for x in range(a,b+1)]
ls2 = [int(x) for x in range(a,b+1)]

ls2.sort(reverse=True)


lss = ls1[0:k]
lse = ls2[0:k]

lis = lss+lse
lis.sort()
for i in lis:
    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 j in range(B-K+1,B+1):
        print(j)
else:
    for k in range(A,B+1):
        print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
j=min(b-a,k)
s=set()
for i in range(j):
    s.add(a+i)
    s.add(b-i)
List=sorted(list(s))
for i in range(len(List)):
    print(List[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-k < i:
        print(i)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
l=[]
for i in range(k+1):
    if a+i not in l and a+i<=b:
        l.append(a+i)
for i in range(k+1):
    if b-k+i not in l and b-k+i>=a:
        l.append(b-k+i)
m=sorted(l)
for i in range(len(m)):
    print(m[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
l = list(range(A,A+K))
r = list(range(B,B-K,-1))
for i in sorted(set(l+r)):
    print(i)

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
l = list(range(A,K+1))
r = list(range(B,B-K,-1))
for i in sorted(set(l+r)):
    print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
tmp = []
for i, n in enumerate(range(A, B+1)):
    if i < K:
        tmp.append(n)
for i, n in enumerate(range(B, A-1, -1)):
    if i < K:
        tmp.append(n)
tmp.sort()
tmp = list(set(tmp))
for i in tmp:
    print(i)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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())
print([i for i in range(A, B + 1) if A + K > i or  B - K < i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

numlist=[]
if k>b-a:
    k=b-a
for i in range(k):
    numlist.append(a+i)
for i in range(k)[::-1]:
    numlist.append(b-i)
numset=set(numlist)
numlist=list(numset)
for item in numlist:
    print(item)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,k = f()
    s = set()
    for i in range(a, min(a+k, b)):
        s.add(i)
    

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

solve()

Submission status: Wrong Answer

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,k = f()
    s = set()
    for i in range(a, a+k):
        s.add(i)

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

solve()

Submission status: Wrong Answer

Solution code:
a,s,d=map(int,input().split())
if s-a<2*d:
  for i in range(a,s+1):
    print(i)
elif (s-a)/2==d-1:
  for i in range(a,s+1):
    print(i)
else:
  for i in range(a,a+d+1):
    print(i)
  for i in range(s-d+1,s+1):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

a,b,k = list(map(int, input().split()))
lis = list(range(a,a+k))
lis.extend(list(range(b-k+1, b+1)))
lis = list(set(lis))
lis.sort()
for i in range(len(lis)):
    print(lis[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

ans=list(set(ab_min)|set(ab_max))
ans.sort()

for k in range(len(ans)):
    print(ans[k])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:


def read_input():
    a, b, k = map(int, input().split())
    return a, b, k


def submit():
    a, b, k = read_input()

    result = []

    count = 0
    for i in range(a, b):
        if count < k:
            result.append(i)
            count += 1
        else:
            break

    count = 0
    for i in range(b, a, -1):
        if count < k:
            result.append(i)
            count += 1
        else:
            break

    result = list(set(result))
    result.sort()

    for r in result:
        print(r)


if __name__ == '__main__':
    submit()

Submission status: Wrong Answer

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

if K >= B:
  print(*sorted(range(A,B+1)), sep = "\n")

else:
  a = [i for i in range(A,A+K)]

  b = [i for i in range(B,B-K,-1)]

  print(*sorted(a+b), sep = "\n")

Submission status: Wrong Answer

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

if K >= B:
  print(*sorted(range(A,B+1)), sep = "\n")

else:
  a = [i for i in range(A,A+K)]
  b = [i for i in range(B,B-K,-1)]
  print(*sorted(set(a+b)), sep = "\n")

Submission status: Wrong Answer

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

if K >= B:
  print(*range(A,B+1), sep = "\n")

else:
  a = [i for i in range(A,A+K)]
  b = [i for i in range(B,B-K,-1)]
  print(*sorted(set(a+b)), sep = "\n")

Submission status: Wrong Answer

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

a = [i for i in range(A,B+1) if i <= A + K or i >= B - K]

print(*a, sep = "\n")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8
A, B, K = map(int, input().split())
ans = []
for k in range(min(B, K)):
	ans.append(A + k)
for k in range(min(B, K)):
	ans.append(B - k)
ans = list(set(ans))
ans.sort()
for a in ans:
	print(a)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
A, B, K = map(int, input().split())
ans = []
for k in range(K):
	ans.append(A + k)
for k in range(K):
	ans.append(B - k)
ans = list(set(ans))
ans.sort()
for a in ans:
	print(a)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
l = []
for i in range(k):
    l.append(a+i)
for i in range(k):
    l.append(b-i)
l = sorted(set(l))
for i in range(len(l)):
    print(l[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:
a,b,k = map(int,input().split())
li = []
x = 0
while a + x <= b and b - x >= a and x <= k :
    li.append(a+x)
    li.append(b-x)
    x += 1
se = set(li)
li = list(se)
li.sort()
for i in li :
    print(i)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
data = range(a,b+1)
b_a = b-a
if b_a <= k*2:
  for num in data:
    print(num)
else:
  min_k = data[:k]
  max_k = data[-k:]
  for num in min_k:
    print(num)
  for num in max_k:
    print(num)

Submission status: Wrong Answer

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

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

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


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

Submission status: Wrong Answer

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

ans = {i for i in range(a,a+k)}
ans2 = {j for j in range(b,b-k,-1)}

ans = ans | ans2
ans = sorted(list(ans))

for an in ans: print(an)

Submission status: Wrong Answer

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

ans = {i for i in range(a,a+k)}
ans2 = {i for i in range(b,b-k,-1)}

ans = ans | ans2
ans = sorted(list(ans))

for an in ans: print(an)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = []
for i in range(K):
    ans.append(A+i)
    ans.append(B-i)
ans = [a for a in ans if A <= a <= B]
ans.sort()
ans = list(set(ans))
for i in ans:
    print(i)

Submission status: Wrong Answer

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

for i in range(K):
    C.add(A+i)
    C.add(B-i)

C = list(C)
C.sort()

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

Submission status: Wrong Answer

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

for i in range(K):
    print(A+i)
    C.append(B-i)

for i in range(K):
    print(C[K-i-1])

Submission status: Wrong Answer

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

if K > A:
    K = B-1
a = [i for i in range(A, A+K)]
b = [i for i in range(B+1-K, B+1)]

a.extend(b)
li = list(set(a))
li.sort()
for i in li:
    print(i)

Submission status: Wrong Answer

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

answer = set()

answer |= set(range(a, min(a+k, b)))
answer |= set(range(b, max(b-k, a), -1))

for i in sorted(answer):
    print(i)

Submission status: Wrong Answer

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

nums = [x for x in range(A, B+1)]

for i in range(0, K):
    if i >= len(nums):
        break
    print(nums[i])

for i in range(len(nums)-K, len(nums)):
    if i < 0:
        break
    print(nums[i])

Submission status: Wrong Answer

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

ans = []
for i in range(k):
    if a+i > b:
        break
    ans.append(a+i)
for i in range(k):
    if b-i < a:
        break
    ans.append(b-i)
ans.sort()
ans = set(ans)

for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
L = [x for x in range(A, B + 1)]
print(*set((L[:K] + L[-K:])), sep="\n")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for j in sorted(set(ans)):
  print(j)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

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

abk = list(set(ak) & set(bk))
abk.sort()

for i in abk:
  print(i)

Submission status: Wrong Answer

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

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

abk = list(set(ak + bk))
abk.sort()

for i in abk:
  print(i)