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:
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:]
array_result.sort()
for I in set(array_result):
    print(I)

Submission status: Wrong Answer

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

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

for i in range(k):
    if not b-k+i+1 in c:
        print(b-k+i+1)

Submission status: Wrong Answer

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

min = [0] * k
max = [0] * k

for i in range(k):
  if a+i >= b:
    break
  min[i] = a+i

for n in range(k):
  if b-n <= a:
    break
  max[n] = b-n

ans = min + max
ans = set(ans)
ans = list(ans)
ans.sort()

for j in ans:
  if j == 0:
    continue
  print(j)

Submission status: Wrong Answer

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

min = [0] * k
max = [0] * k

for i in range(k):
  if a+i > b:
    break
  min[i] = a+i

for n in range(k):
  if b-n < a:
    break
  max[n] = b-n

ans = min + max
ans.sort()
ans = set(ans)


for j in ans:
  if j == 0:
    continue
  print(j)

Submission status: Wrong Answer

Solution code:
def actual(A, B, K):
    stop_A = min(A + (K - 1) + 1, B)
    left = [i for i in range(A, stop_A)]

    stop_B = max(B - (K - 1) - 1, A)
    right = [i for i in range(B, stop_B, -1)][::-1]

    not_duplicated = sorted(set(left + right))

    return '\n'.join(map(str, not_duplicated))

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

Submission status: Wrong Answer

Solution code:
def actual(A, B, K):
    nums = [str(x) for x in range(A, B + 1)]

    satisfied_nums = sorted(set(nums[:K] + nums[-K:]))

    return '\n'.join(satisfied_nums)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = set(ans1 + ans2)

print(*ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b+1),1):
    ans.append(i)
for i in range(b,max(a,b-k+1),-1):
    ans.append(i)
ans=list(set(ans)) #重複を削除
ans.sort() #ソート
for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
def solve():
    a, b, k = map(int, input().split())
    ans = list()
    for i in range(a, min(a+k, b+1), 1):
        ans.append(i)
    for i in range(b, max(b-k,a), -1):
        ans.append(i)
    ans.sort()
    for i in set(ans):
        print(i)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
def solve():
    a, b, k = map(int, input().split())
    ans = list()
    for i in range(a, min(a+k, b+1), 1):
        ans.append(i)
    for i in range(b, max(b-k,a), -1):
        ans.append(i)
    for i in set(ans):
        print(i)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

ansl=[]

for i in range(a,min(b+1,a+k)):
    ansl.append(i)
for i in range(b,max(8-k,a-1),-1):
    ansl.append(i)

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
if K > B-A:
    ans = list(range(A, B+1))
else:
    ans = list(range(A, A+K)) + list(range(B, B - K, -1))
ans.sort()
print(*ans, sep='\n')

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
if K > B-A:
    ans = list(range(A, A+1))
else:
    ans = list(range(A, A+K)) + list(range(B, B - K, -1))
ans.sort()
print(*ans, sep='\n')

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
l = B - A
if K > l:
    K = l
sub = [i for i in range(A, B+1)]
ans = sub[0:K] + sub[len(sub)-K:len(sub)]
ans.sort()
print(*set(ans), sep='\n')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a, b,x = map(int, input().split())
    set1=set([i for i in range(a,a+x)])
    set2=set([i for i in range(b-x+1,b+1)])
    sumSet = set1 | set2
    list = list(sumSet)
    list.sort()

    for i in list:
        print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, K = map(int, input().split())
    count = []
    for _ in range(B-A+1):
        count.append(A+_)
    if 2*K > B-A-1:
        K = B-A+1
    for i in range(K):
        print(count[i])
    for j in range(K):
        if count[(K*-1)+j] > count[K-1]:
            print(count[(K*-1)+j])
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    A, B, K = map(int, input().split())
    count = [A]
    ans = []
    for _ in range(B-A):
        count.append(A+1)
        A += 1
    if K > B-A-1:
        K = B-A+1
    for i in range(K):
        if count[i] <= B:
            ans.append(count[i])
    for j in range(K):
        if count[(j+1)*-1] >= count[K-1]:
            ans.append(count[j*-1])
    an = sorted(set(ans))
    for i in range(len(an)):
        print(an[i])
resolve()

Submission status: Wrong Answer

Solution code:
import math
from collections import deque
from collections import defaultdict

import itertools as it

#自作関数群
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq
def get_sieve_of_eratosthenes(n):
	#data = [2]
	data = [0,0,0]
	for i in range(3,n+1,2):
		data.append(i)
		data.append(0)
	for i in range(len(data)):
		interval = data[i]
		if interval!=0:
			for j in range(i+interval,n-1,interval):
				data[j] = 0
	#ans = [x for x in data if x!=0]
	ans = data[:]
	return ans

a,b,k = readInts()

o = set(range(a,a+k))
t = set(range(b-k+1,b+1))
ans = sorted(list(o|t))

for i in ans:
	print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
C = [i for i in range(A,B+1)]
N = len(C)
U = C[N-K:]
D = C[:K]
L = D+U
for l in L:
    print(l)

Submission status: Wrong Answer

Solution code:
import math
import re
import copy
import sys

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

Submission status: Wrong Answer

Solution code:
import math
import re
import copy
import sys

a,b,k = map(int,input().split())
l = range(a,b+1)
if a + k > b:
    k = b - a + 1
for i in l[:k]:
    print(i)
le = len(l)
if b-a-k > 0:
    if k > b-a-k:
        k = b-a-k +1
    for i in l[le-k:le]:
        print(i)

Submission status: Wrong Answer

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

ans = []

for i in range(a,b+1):
  if a<= i <= a+k or b-k <= i <= b:
    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())
if B-A !=0:
    K=min(K,B-A)
ans=set()
for i in range(K):
    ans.add(A+i)
    ans.add(B-i)
ans=list(ans)
ans=sorted(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)
ans=set()
for i in range(K):
    ans.add(A+i)
    ans.add(B-i)
ans=list(ans)
ans=sorted(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)
ans=set()
for i in range(K+1):
    ans.add(A+i)
    ans.add(B-i)
ans=list(ans)
ans=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,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 + 1> 2*K:
    a = list(range(A, A+K))
    b = list(range(B-K+1,B+1))
    c = set(a+b)
    print(*c, sep="\n")
else:
    print(*range(A,B+1), sep="\n")

Submission status: Wrong Answer

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

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)
print(ans)  
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):
    t1 = a+i
    t2 = b-i
    ans.append(t1)
    ans.append(t2)
A = list(set(ans))

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#l = list(range(A,B+1))

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if k<(b-a+1)//2:
    A=set()
    for i in range(k):
        A.add(a+i)
        A.add(b-i)
    print(*sorted(A),sep="\n")
else:
    for i in range(a,b+1):
        print(i)

Submission status: Wrong Answer

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

W = list(range(A,A+K))
w = list(range(B-K+1,B+1))

A = sorted(set(W+w))
for i in A: print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
candidate1 = [str(i) for i in range(A, A+K) if i <= B]
candidate2 = [str(i+1) for i in range(B-K, B) if i+1 >= A]

ans = list(sorted(list(set(candidate1+candidate2))))

print('\n'.join(ans))

Submission status: Wrong Answer

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

for i in range(len(candidate)):
    if candidate[i] <= A+K or candidate[i] >= B-K:
        print(candidate[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
c=[i for i in range(a, b+1)]
al=a+k
bs=b-k
if al>b:
	al=b
if bs<a:
	bs=a
d=[i for i in range(al, bs+1)]
e=list(set(c)^set(d))
for i in e:
	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:
    ans = []
    for j in range(A, A+K):
        print(j)
    for k in range(B-K+1, B+1):
        print(k)

Submission status: Wrong Answer

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

if B > K:
    for i in range(A, A+K):
        print(i)
    for j in range(B-K+1, B+1):
        if A+K-1 != j:
            print(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(A, A+K):
    print(i)
for j in range(B-K+1, B+1):
    if A+K-1 != j:
        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())
if b-a+1>=2*k:
    for i in range(k):
        print(i)
    for i in range(k):
        print(b-k+1+i)
else:
    for i in range(a,b+1):
        print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
l=[int(i) for i in range(a,b+1)]
l1=sorted(l,reverse=True)
ans=[]
if k>len(l):
    for a in l:
        print(a)
else:
    for i in range(0,k):
        ans.append(l[i])
    for j in range(0,k):
        ans.append(l1[j])
    ans=set(sorted(ans))
    for g in ans:
        print(g)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
count = 0
for x in range(a, b+1):
    if count == k:
        break
    count += 1
    print(x)

count = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
if B-A<K-1:
  K=B-A
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=set(l)
l=sorted(l)
for i in range(len(l)):
  print(l[i])

Submission status: Wrong Answer

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

a_l = [a+i for i in range(k+1)]
b_l = [b-i for i in range(k+1)]
if b-a < k:
    [print(i) for i in range(a,b+1)]
else:
    [print(i) for i in set(a_l+b_l)]

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
if B-A<K:
  K=B-A
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=set(l)
l=sorted(l)
for i in range(len(l)):
  print(l[i])

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

A,B,K = inputIL()
if B==1000000000:
  S1 = list(range(1,1+K))
  S2 = list(range(B+1-K,B+1))
  print(*S1,sep="\n")
  print(*S2,sep="\n")
  exit()
S = list(filter(lambda x: (A+K>x or B-K<x),list(range(A,B+1))))
print(*S,sep="\n")

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

Submission status: Wrong Answer

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

s = set()
for i in range(a, a+k):
    if a <=  i <= b:
        s.add(i)
for i in range(b-k, b+1):
    if a <=  i <= b:
        s.add(i)
for i in s:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ans_list = []
for i in range(a,a+k):
    ans_list.append(i)
    if ans_list[-1] == b:
        print(ans_list)
        exit()
for i in range(b-k+1,b+1):
    if ans_list.count(i) == 0:
        ans_list.append(i)
[print(i) for i in ans_list]

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ans_list = []
for i in range(a,a+k):
    ans_list.append(i)
    if ans_list[-1] == b:
        print(ans_list)
        exit()
for i in range(b-k+1,b+1):
    if ans_list.count(i) == 0:
        ans_list.append(i)
print(ans_list)

Submission status: Wrong Answer

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

tmp_s = {i for i in range(A, A+K)}
tmp_l = {i for i in range(B+1-K, B+1)}

ans = list(tmp_s.union(tmp_l))
ans.sort()

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

Submission status: Wrong Answer

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

s = [i for i in range(A,A+K)]
l = [j for j in range(B-K+1,B+1)]
for k in l:
    s.append(k)
w = sorted(set(s))
for j in w:
    print(j)

Submission status: Wrong Answer

Solution code:
A,B,K = map(int, input().split())
List = [i for i in range(A,B+1)]
s = [i for i in range(A,A+K)]
l = [j for j in range(B-K+1,B+1)]
for k in l:
    s.append(k)
w = sorted(set(s))
for j in w:
    print(j)

Submission status: Wrong Answer

Solution code:
A,B,K = map(int, input().split())
List = [i for i in range(A,B+1)]
s = List[0:K]
r = List[::-1]
l = r[0:K]
for i in l:
    s.append(i)
print(sorted(set(s)))

Submission status: Wrong Answer

Solution code:
import math
a , b , k = map(int , input().split())
ans = set()
for i in range(min(k , math.ceil((b - a) / 2))):
  ans.add(a + i)
  ans.add(b - i)
ans = sorted(list(ans))
print('\n'.join([str(n) for n in ans]))

Submission status: Wrong Answer

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

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 = list(ans)
print(*sorted(ans), sep='\n')

Submission status: Wrong Answer

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

  
s = sorted(list(s))
for i in s:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
for n in sorted(set(range(A, A + K)) | set(range(B - K + 1, B + 1))):
    print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=[]
for i in range(c):
    d.append(a)
    a+=1
    d.append(b)
    b-=1
d.sort()
for j in range(len(d)):
    print(d[j])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A_th = B if A+K > B else A+K
B_th = A if B-K < A else B-K

L = sorted(list(set(list(range(A, A_th, 1)) + list(range(B_th+1, B+1, 1)))))

for l in L:
  print(l)

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

used = set()
for i in range(a, a+k):
  print(i)
  used.add(i)
for i in range(b-k+1, b+1):
  if not i in used:
    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 2*k>=b-a:
  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)