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: Time Limit Exceeded

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


nums=[]
for i in range(a,b+1):
    nums.append(i)
#print(nums)
nums2=sorted(nums,reverse=True)
#print(nums2)

if k>=b-a+1:
    for x in nums:
        print(x)
else:
    ans=[]
    for j in range(k):
        ans.append(nums[j])
        ans.append(nums2[j])

    ans=sorted(set(ans))

    #print(ans)

    for l in ans:
        print(l)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(a,b+1):
    nums.append(i)

nums2=sorted(nums,reverse=True)

#ans作成
ans=[]
for j in nums[:k]:
    ans.append(j)

for x in nums2[:k]:
    ans.append(x)
ans=sorted(set(ans))

if (b-a)+1<k:
    for y in nums:
        print(y)

else:
    for z in ans:
        print(z)

Submission status: Time Limit Exceeded

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

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

    l = [i for i in range(a, b+1)]
    ans = sorted(set(l[:k] + l[-k:]))

    [print(i) for i in ans]

Submission status: Time Limit Exceeded

Solution code:

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

for i in range(B-A+1):

    if i <= K-1 or max( B - (A + i) , -B + ( A + i ) ) <= K-1:
        print (A+i)

Submission status: Time Limit Exceeded

Solution code:
a,b,k = map(int,input().split())
lia = list(range(a,a+k))
lib = list(range(b-k+1,b+1))
setans = set(lia + lib)&set(range(a,b+1))
for i in sorted(setans):
  print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

a, b, k = map(int, input().split())
tmp = 0
aa = set()

for i in range(a, b+1):
    if tmp < k:
        aa.add(i)
    tmp += 1

tmp = 0

for i in range(a, b+1):
    if tmp >= b+1-a-k:
        aa.add(i)
    tmp += 1

for i in sorted(list(aa)):
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(length):
    if i <= k-1 or length-1-i<=k-1:
        index.append(i)

for i in index:
    print(a+i)

Submission status: Time Limit Exceeded

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

for i in range(length):
    if i <= k-1 or length-1-i<=k-1:
        index.append(i)

for i in index:
    print(num[i])

Submission status: Time Limit Exceeded

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

for i in first_k:
    print(i)
for i in latter_k:
    if i not in first_k:
        print(i)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a,b,k = map(int,input().split())
ans = [i for i in range(a,b+1) if i in range(a,min(a+k,b+1)) or i in range(max(a,b-k+1),b+1)]
for i in range(len(ans)):
    print(ans[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, K: int):
    for i in range(A,B+1):
        if i - A < K or B - i < K:
            print(i)


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# 2019/05/22
# AtCoder Beginner Contest 093 - B

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

vals = list()
for i in range(a, b+1):
    vals.append(i)

if b - a + 1 < k:
    wk = b - a + 1
else:
    wk = k

# small
for i in range(wk):
    print(vals[i])
if k * 2 > b - a + 1:
    wk = b - a + 1 - wk

# large
for i in range(len(vals)-wk, len(vals)):
    print(vals[i])

Submission status: Time Limit Exceeded

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

for i in ans:
    print(i)

Submission status: Time Limit Exceeded

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

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

arr = [i for i in range(a, b+1)]
arr_slice = set(arr[:k]) | set(arr[-k:])
[print(i) for i in sorted(arr_slice)]

Submission status: Time Limit Exceeded

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

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

arr = sorted([i for i in range(a, b+1)])
arr_slice = set(arr[:k]) | set(arr[-k:])
[print(i) for i in sorted(arr_slice)]

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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=list(set(l))
l.sort()
for i in l:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
A,B,K=map(int,input().split())
X=range(A,B+1)
i=0
while i<=len(X)-1:
    if i<=K-1 or i>=len(X)-K:
        print(X[i])
        i+=1
    else:
        i+=1

Submission status: Time Limit Exceeded

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

solve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
  A, B, K = [int(x) for x in input().split()]
  l = [str(i) for i in range(A, B + 1) if i < A + K or i > B - K]
  print('\n'.join(l))


if __name__ == "__main__":
  main()

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

b = sorted(set(a[:K]+a[-K:]))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# ABC093B - Small and Large Integers
a, b, k = list(map(int, input().rstrip().split()))
lst = []
ans = []
for i in range(a, b + 1):
    lst.append(i)
if k >= b - a:
    for i in range(a, b + 1):
        print(i)
else:
    for i in range(k):
        ans.append(a + i)
    for j in range(k):
        if b - j not in ans:
            ans.append(b - j)
    ans = sorted(ans)
    for k in ans:
        print(k)

Submission status: Time Limit Exceeded

Solution code:
# ABC093B - Small and Large Integers
a, b, k = list(map(int, input().rstrip().split()))
lst = []
ans = []
for i in range(a, b + 1):
    lst.append(i)
if k >= b - a:
    for i in lst:
        print(i)
else:
    for i in range(k):
        ans.append(lst[i])
    for j in range(-1, -k - 1, -1):
        if lst[j] not in ans:
            ans.append(lst[j])
    ans = sorted(ans)
    for k in ans:
        print(k)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

ans = {i for i in range(a,b+1) if (i < a+k)or(i>b-k) }

ans = sorted(list(ans))

for an in ans: print(an)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

j = 0
k = B-K

for i in range(A, B+1):
    if K > j or k < i:
        print(i)
    j += 1

Submission status: Time Limit Exceeded

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

nums = [x for x in range(A, B+1)]
ans = set()
for i in range(0, K):
    if i >= len(nums):
        break
    ans.add(nums[i])

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

for n in sorted(list(ans)):
    print(n)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a,b,k=map(int,input().split())
N=[int(i) for i in range(a,b+1)]
Ans=N[:k]+N[-k:]
print(*sorted(set(Ans)),sep="\n")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

L = []

for i in range(A, B + 1):
  if i < A + K or i > B - K:
    L.append(i)

for i in L:
  print(i)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in List[:K]:
    ans.append(i)
for i in List[-K:]:
    ans.append(i)

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

Submission status: Time Limit Exceeded

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

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

for i in li:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

if b-a+1 >= 2*k:
    l = [i for i in range(a, b + 1)]
    ans = (sorted(l[:k] + l[-k:]))
else:
    ans = [i for i in range(a, b + 1)]

for i in ans:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
a,b,k = [int(_) for _ in stdin.readline().rstrip().split()]
nums = [_ for _ in range(a,b+1)]
ans = nums[:k]+nums[-k:]
if len(nums) < k*2:
    ans = list(set(ans))
    ans.sort()
for i in ans:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
ansnums =[i for i in range(B-K+1,B+1)]
nums = [i for j,i in enumerate(range(A,B+1)) if j<K or i in ansnums]
anss = sorted(set(nums))
for i in anss:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
    A, B, K = map(int, input().split())
    all_nums = [x for x in range(A, B+1)]
    cond_nums = all_nums[:K]
    for n in all_nums[-K:]:
        if n not in cond_nums:
            cond_nums.append(n)
    for x in cond_nums:
        print(x)


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

s = set()

for i in range(A, B + 1):
    if i <= A + K - 1:
        s.add(i)
    elif B - K + 1 <= i:
        s.add(i)

s = sorted(s)

for i in s:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
""" AtCoder """

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

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

ans = []

if B - A < K:
    ans = l
else:
    for i in range(K):
        ans.append(l[i])
        ans.append(l[-i-1])

ans = set(ans)

ans = sorted(ans)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

if K*2 >= len(list):
    for i in range(len(list)):
        print(list[i])
else:
    for i in range(K):
        print(list[i])
    for i in range(K):
        print(list[i+len(list)-1-K+1])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

  if int(n-A)<K or int(B-n)<K:
    print(n)
  n += 1

Submission status: Time Limit Exceeded

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions

def j(q):
    if q==1: print("YES")
    else:print("NO")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#n = ip()                              #入力整数1つ
#n,k= (int(i) for i in input().split())      #入力整数横2つ
x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

#jの変数はしようできないので注意
for i in range(x,y+1):
    if i <x+z:
        print(i)
    elif i > y-z:
        print(i)

Submission status: Time Limit Exceeded

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions

def j(q):
    if q==1: print("YES")
    else:print("NO")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#n = ip()                              #入力整数1つ
#n,k= (int(i) for i in input().split())      #入力整数横2つ
x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

#jの変数はしようできないので注意

a = [i for i in range(x,y+1)]
l = len(a)
b = a[:z]
b.extend(a[l-z:])
c = set(b)
b = list(c)
b.sort()
for i in range(len(b)):
    print(b[i])

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

sub = [i for i in range(A,B+1) if A<= i<= A+K-1 or B-K+1 <= i <= B]
for i in sub:
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

ans = '\n'.join(map(str, l))
print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

if(A==B and K>=1):
    print(A)
    quit()
elif(A==B and K==0):
    quit()

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

else:

    if(K>B):
        K=B

    for i in range(K):
        if(A+i<=B):
            print(A+i)
        c.append(A+i)

    for i in range(0,A):
        c.append(i)

    if(B-K<=0):
        quit()


    for i in range(B-K+1,B+1):
        if(i not in c and i<=B):
            print(i)

Submission status: Time Limit Exceeded

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

if(K>B):
    K=B

for i in range(K):
    if(A+i<=B):
        print(A+i)
    c.append(A+i)

for i in range(A):
    c.append(i)

if(B-K<=0):
    quit()


for i in range(B-K+1,B+1):
    if(i not in c and i<=B):
        print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

tmp = [i for i in range(A, B+1)]
for i in sorted(set(tmp[:K] + tmp[B-A-K+1:])):
    print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
center = (A + B) // 2

max_limit = A + K - 1
min_limit = B - K + 1

for i in range(A, center + 1):
    if i <= max_limit:
        print(i)
        
for i in range(center + 1, B + 1):
    if min_limit <= i:
        print(i)