ZhenlongDai/ACPR huggingface dataset:
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
2 13 011

Expected output:
2
3
4
5
6
7
8
9
10
11
12
13


Actual output:
2
3
4
5
6
7
8
9
10
11
12


Fixed submission (verdict: Accepted):
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, B-K+1)
for j in range(n, B+1):
    print(j)

Problem: p03386
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())
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)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    A, B, K = map(int, input().split())
    num = []
    for i in range(A, A + K):
        num.append(i)

    for i in range(B, B - K, -1):
        num.append(i)

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

if __name__ == '__main__':
    main()


Failing test case input:
2 4 110

Expected output:
2
3
4


Actual output:
-105
-104
-103
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111


Fixed submission (verdict: Accepted):
def main():
    A, B, K = map(int, input().split())
    num = []
    for i in range(A, A + K):
        num.append(i)

    for i in range(B, B - K, -1):
        num.append(i)

    num = list(set(num))
    num.sort()
    num = filter(lambda x: A <= x <= B, num)
    for i in num:
        print(i)

if __name__ == '__main__':
    main()

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())
K = min(K,B-A+1)
S = set()
for i in range(K):
    S.add(A + i)
for i in range(K):
    S.add(B - i)

for x in S:
    print(x)

Failing test case input:
-1 7 011

Expected output:
-1
0
1
2
3
4
5
6
7


Actual output:
0
1
2
3
4
5
6
7
-1


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
K = min(K,B-A+1)
S = set()
for i in range(K):
    S.add(A + i)
for i in range(K):
    S.add(B - i)
L = sorted(list(S))
for x in L:
    print(x)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    a, b, k = map(int, input().split())
    
    s = set()

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

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

    for i in s:
        if a <= i and i <= b:
            print(i)

if __name__ == "__main__":
    main()


Failing test case input:
-4 6 7

Expected output:
-4
-3
-2
-1
0
1
2
3
4
5
6


Actual output:
0
1
2
3
4
5
-1
-4
-3
-2


Fixed submission (verdict: Accepted):
def main():
    a, b, k = map(int, input().split())
    
    s = set()

    for i in range(a, a+k):
        s.add(i)

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

    for i in sorted(s):
        if a <= i and i <= b:
            print(i)

if __name__ == "__main__":
    main()

Problem: p03386
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,k=map(int,input().split())
if b-a <= k*2:
  for i in range(a,b+1):
    print(i)
else:
  for i in list(range(a,a+k)) + list(range(b-k+1,b+1)):
    print(i)

Failing test case input:
2 4 001

Expected output:
2
4


Actual output:
2
3
4


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
if b-a < k*2:
  for i in range(a,b+1):
    print(i)
else:
  for i in list(range(a,a+k)) + list(range(b-k+1,b+1)):
    print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K=map(int,input().split())
l=[]
for i in range(A,B+1):
    l.append(i)
print(l)
if 2*K>=len(l):
    for i in l:
        print(i)
else:

    for i in l[0:K]:
        print(i)
    for i in l[B-A-1:B+1]:
        print(i)
    


Failing test case input:
5 6 110

Expected output:
5
6


Actual output:
[5, 6]
5
6


Fixed submission (verdict: Accepted):
A,B,K=map(int,input().split())
l=[]
if 2*K>=B-A+1:
    for i in range(A,B+1):
        print(i)
else:
    for i in range(K):
        print(i+A)
    for i in range(K):
        print(B-K+1+i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = [int(_) for _ in input().split()]
if 2*K < B-A:
    print("\n".join([str(_) for _ in list(range(A,A+K)) + list(range(B-K+1,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))

Failing test case input:
-8 6 7

Expected output:
-8
-7
-6
-5
-4
-3
-2
0
1
2
3
4
5
6


Actual output:
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6


Fixed submission (verdict: Accepted):
A, B, K = [int(_) for _ in input().split()]
if 2*K <= B-A:
    print("\n".join([str(_) for _ in list(range(A,A+K)) + list(range(B-K+1,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

C = list(int(i) for i in input().split())
A = []
B = []
D = []
for i in range(C[0], C[0]+C[2]):
    A.append(i)
for i in range(C[1]-C[2]+1, C[1]+1):
    B.append(i)
for i in range(C[2]):
    print(A[i])
for i in range(C[2]):
    if B[i] not in A:
        print(B[i])


Failing test case input:
0 4 110

Expected output:
0
1
2
3
4


Actual output:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
-105
-104
-103
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1


Fixed submission (verdict: Accepted):
C = list(int(i) for i in input().split())
A = []
B = []
for i in range(C[0], C[0]+C[2]):
    if i in range(C[0], C[1]+1):
        A.append(i)
for i in range(C[1]-C[2]+1, C[1]+1):
    if i in range(C[0], C[1]+1):
        if i not in A:
            A.append(i)
A.sort
for i in range(len(A)):
    print(A[i])

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K = map(int,input().split())
a = [A+i for i in range(K) if A+i <= B]
b = [B-K+1+i for i in range(K) if B-K+1-i >= A]
a.extend(b)
a = set(a)
a = [x for x in a]
a.sort()
for i in range(len(a)):
  print(a[i])

Failing test case input:
2 14 9

Expected output:
2
3
4
5
6
7
8
9
10
11
12
13
14


Actual output:
2
3
4
5
6
7
8
9
10


Fixed submission (verdict: Accepted):
A,B,K = map(int,input().split())
a = [A+i for i in range(K) if A+i <= B]
b = [B-K+1+i for i in range(K) if B-K+1+i >= A]
a.extend(b)
a = set(a)
a = [x for x in a]
a.sort()
for i in range(len(a)):
  print(a[i])

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())
if b-a > 2*k:
    for i in range(k):
        print(a+i)
    for i in range(1, k+1):
        print(b-k+i)
else:
    for i in range(b-a+1):
        print(a+i)

Failing test case input:
2 4 001

Expected output:
2
4


Actual output:
2
3
4


Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())
if b-a >= 2*k:
    for i in range(k):
        print(a+i)
    for i in range(1, k+1):
        print(b-k+i)
else:
    for i in range(b-a+1):
        print(a+i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
1 13 6

Expected output:
1
2
3
4
5
6
8
9
10
11
12
13


Actual output:
1
2
3
4
5
6
7
8
9
10
11
12
13


Fixed submission (verdict: Accepted):
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)

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

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

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

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


if __name__ == '__main__':
    main()

Failing test case input:
5 6 110

Expected output:
5
6


Actual output:
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-103
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6


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

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

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

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

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


if __name__ == '__main__':
    main()
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K=map(int,input().split())
ks=[]
for i in range(K):
    ks.append(A+i)
    ks.append(B-i)
new_ks=list(set(ks))
new_ks.sort()
for i in range(len(new_ks)):
    print(new_ks[i])
    

Failing test case input:
0 7 110

Expected output:
0
1
2
3
4
5
6
7


Actual output:
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


Fixed submission (verdict: Accepted):
A,B,K=map(int,input().split())
ks=[]
for i in range(K):
    if (A+i)<=B:
        ks.append(A+i)
    if A<=(B-i):
        ks.append(B-i)
new_ks=list(set(ks))
new_ks.sort()
for i in range(len(new_ks)):
    print(new_ks[i])

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lists = input().split()
a = int(lists[0])
b = int(lists[1])
x = int(lists[2]) * 2
answer  = []
next = 0
for num in range(0, x):
    answer.append(a)
    answer.append(b)
    if (len(answer) >= x):
        break
    a += 1
    b -= 1
    if(a == b):
        if(a + num < b - num):
            for b_num in range(b, a):
                answer.append(b_num)
                if (len(answer) >= x):
                    break
        elif(a + num > b - num):
            for a_num in range(a, b):
                answer.append(a_num)
                if (len(answer) >= x):
                    break
        break
answer.sort()
for a in answer:
    print(a)

Failing test case input:
-2 -1 5

Expected output:
-2
-1


Actual output:
-5
-4
-3
-2
-2
-1
-1
0
1
2


Fixed submission (verdict: Accepted):
lists = input().split()
a = int(lists[0])
b = int(lists[1])
x = int(lists[2]) * 2
answer  = []
next = 0
for num in range(0, x):
    if(a == b):
        answer.append(a)
        break
    answer.append(a)
    answer.append(b)
    a += 1
    b -= 1
    if(len(answer) >= x or a > b or b < 0):
        break
    if(a == b):
        answer.append(a)
        if(a + num < b - num):
            for b_num in range(b, a):
                answer.append(b_num)
                if (len(answer) > x):
                    break
        elif(a + num > b - num):
            for a_num in range(a, b):
                answer.append(a_num)
                if (len(answer) > x):
                    break
        break
answer.sort()
for a in answer:
    print(a)
Problem: p03386
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,k = map(int,input().split())
ans = set()
for i in range(k):
    if b>a+i: ans.add(a+i)
for i in range(k):
    if a<b-i: ans.add(b-i)
ans = sorted(ans)
for i in ans:
    print(i)

Failing test case input:
6 6 110

Expected output:
6


Actual output:

Fixed submission (verdict: Accepted):
a,b,k = map(int,input().split())
ans = set()
for i in range(k):
    if b>=a+i: ans.add(a+i)
for i in range(k):
    if a<=b-i: ans.add(b-i)
ans = sorted(ans)
for i in ans:
    print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = list(map(int, input().split()))

if abs(A-B)<K:
    for i in range(A, B+1):
        print(i)
else:
    x = {i for i in range(A, A+K)}
    y = {j for j in range(B-K+1, B+1)}
    z = x | y
    z = sorted(list(z))
    print(z)
    for a in z:
        print(a)

Failing test case input:
4 5 001

Expected output:
4
5


Actual output:
[4, 5]
4
5


Fixed submission (verdict: Accepted):
A, B, K = list(map(int, input().split()))

if abs(A-B)<K:
    for i in range(A, B+1):
        print(i)
else:
    x = {i for i in range(A, A+K)}
    y = {j for j in range(B-K+1, B+1)}
    z = x | y
    z = sorted(list(z))
    for a in z:
        print(a)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K=[int(s) for s in input().split()]
if (B-A+1)>=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+i-K+1)
  
  

Failing test case input:
5 10 110

Expected output:
5
6
7
8
9
10


Actual output:
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10


Fixed submission (verdict: Accepted):
A,B,K=[int(s) for s in input().split()]
if (B-A+1)<=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+i-K+1)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())
ans = []
if 2 * k >= b - a:
	for i in range(a, b + 1):
		print(i)
	exit()
for i in range(a, a + k):
	ans.append(i)
for i in range(b - k + 1, b + 1):
	ans.append(i)
ans.sort()
for i in range(len(ans)):
	print(ans[i])

Failing test case input:
-8 6 7

Expected output:
-8
-7
-6
-5
-4
-3
-2
0
1
2
3
4
5
6


Actual output:
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6


Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())
ans = []
if 2 * k > b - a:
	for i in range(a, b + 1):
		print(i)
	exit()
for i in range(a, a + k):
	ans.append(i)
for i in range(b - k + 1, b + 1):
	ans.append(i)
ans.sort()
for i in range(len(ans)):
	print(ans[i])

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int,input().split())
ans = []
for i in range(A, B+1)[:K]:
  ans.append(i)
for i in range(A, B+1)[-K:]:
  ans.append(i)
for a in list(set(ans)):
  print(a)

Failing test case input:
4 16 1

Expected output:
4
16


Actual output:
16
4


Fixed submission (verdict: Accepted):
A, B, K = map(int,input().split())
ans = []
for i in range(A, B+1)[:K]:
  ans.append(i)
for i in range(A, B+1)[-K:]:
  ans.append(i)
for a in sorted(list(set(ans))):
  print(a)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = list(map(int, input().split()))

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

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

res = sorted(set(ret), key=ret.index)
for i in res:
    print(i)

Failing test case input:
2 12 110

Expected output:
2
3
4
5
6
7
8
9
10
11
12


Actual output:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1


Fixed submission (verdict: Accepted):
a, b, k = list(map(int, input().split()))
ret = []

for i in range(a, a + k):
    if i <= b and ret.count(i) == 0:
        ret.append(i)

for i in range(b - k + 1, b + 1):
    if i >= a and ret.count(i) == 0:
        ret.append(i)

for i in ret:
    print(i)
Problem: p03386
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, K = map(int, input().split())
K = min(K, B - A)
res = set()
for i in range(K):
    res.add(A + i)
    res.add(B - i)
res = sorted(list(res))
print(*res, sep='\n')

Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
res = set()
for i in range(K):
    if A + i <= B:
        res.add(A + i)
    if B - i >= A:
        res.add(B - i)
res = sorted(list(res))
print(*res, sep='\n')

Problem: p03386
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

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

Failing test case input:
-8 6 7

Expected output:
-8
-7
-6
-5
-4
-3
-2
0
1
2
3
4
5
6


Actual output:
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6


Fixed submission (verdict: Accepted):
A,B,K=map(int,input().split())
if B-A>=2*K:
    for i in range(A,A+K-1+1):
        print(i)
    for i in range(B-K+1,B+1):
        print(i)
    exit()
else:
    for i in range(A,B+1):
        print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())

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

for i in a:
    print(i)

Failing test case input:
4 21 110

Expected output:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


Actual output:
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
21
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())

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

if A == B:
    print(A)
else:
    for i in a:
        print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K=map(int,input().split())
length=B-A+1

if round(length/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)

Failing test case input:
3 23 010

Expected output:
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
20
21
22
23


Actual output:
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23


Fixed submission (verdict: Accepted):
import math

A,B,K=map(int,input().split())
length=B-A+1
 
if math.ceil(length/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)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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

Failing test case input:
6 8 3

Expected output:
6
7
8


Actual output:
6
7
8
6
7
8


Fixed submission (verdict: Accepted):

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
8 39 011

Expected output:
8
9
10
11
12
13
14
15
16
17
18
29
30
31
32
33
34
35
36
37
38
39


Actual output:
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39


Fixed submission (verdict: Accepted):
a,b,k = tuple(map(int,input().split()))
s = set([])
for i in range(min(k,b-a+1)):
  s.add(a+i)
  s.add(b-i)

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
0 9 110

Expected output:
0
1
2
3
4
5
6
7
8
9


Actual output:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
if a+k-1<b-k+1:
 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)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())
ans = list(set(range(A, A+K)) | set(range(B-K, B)))
ans.sort()
for i in ans:
	if A <= i <= B:
		print(i)

Failing test case input:
3 11 3

Expected output:
3
4
5
9
10
11


Actual output:
3
4
5
8
9
10


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
ans = list(set(range(A, A+K)) | set(range(B-K+1, B+1)))
ans.sort()
for i in ans:
	if A <= i <= B:
		print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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


Failing test case input:
3 23 010

Expected output:
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
20
21
22
23


Actual output:
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23


Fixed submission (verdict: Accepted):

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

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,K = map(int,input().split())
if (B-A) < K:
    for i in range(A,B+1):
        print(i)
    exit()
min_list = list(range(A,A+K))
max_list = list(range(B-K+1,B+1))
lists = list(set(min_list) | set(max_list))
lists.sort()
print(lists)

Failing test case input:
2 35 010

Expected output:
2
3
4
5
6
7
8
9
10
11
26
27
28
29
30
31
32
33
34
35


Actual output:
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]


Fixed submission (verdict: Accepted):
A,B,K = map(int,input().split())
if abs(B-A) < K:
    for i in range(A,B+1):
        print(i)
    exit()
min_list = list(range(A,A+K))
max_list = list(range(B-K+1,B+1))
lists = list(set(min_list) | set(max_list))
lists.sort()
for i in range(len(lists)):
    print(lists[i])

Problem: p03386
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B,K = map(int,input().split())
List = []
for i in range(K):
    c = A + i
    d = B - i
    if((c in List) == False and c >= A and c <= B):
        List.append(c)
    if((d in List) == False and d >= A and d <= B):
        List.append(d)
List = sorted(List)
print(List)

Failing test case input:
0 11 3

Expected output:
0
1
2
9
10
11


Actual output:
[0, 1, 2, 9, 10, 11]


Fixed submission (verdict: Accepted):
A,B,K = map(int,input().split())
List = []
for i in range(K):
    c = A + i
    d = B - i
    if((c in List) == False and c >= A and c <= B):
        List.append(c)
    if((d in List) == False and d >= A and d <= B):
        List.append(d)
List = sorted(List)
for i in List:
    print(i)
Problem: p03386
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
4 16 1

Expected output:
4
16


Actual output:
16
4


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
tmp = []
for i, n in enumerate(range(A, B+1)):
    if i >= K:
        break
    tmp.append(n)
for i, n in enumerate(range(B, A-1, -1)):
    if i >= K:
        break
    tmp.append(n)
tmp = list(set(tmp))
tmp.sort()
for i in tmp:
    print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 23 010

Expected output:
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
20
21
22
23


Actual output:
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
if b-a+1>=2*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)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
    a,b,k = map(int,input().split())
    ansSet = set()


    if a+k > b:
        c = b
    else:
        c = a+k

    for i in range(a,c):
        ansSet.add(i)
    
    if b-k < a:
        c = a
    else:
        c = b-k

    for i in range(b,c,-1):
        ansSet.add(i)

    print(sorted(list(ansSet)))


if __name__== "__main__":
    main() 






Failing test case input:
5 6 110

Expected output:
5
6


Actual output:
[5, 6]


Fixed submission (verdict: Accepted):


def main():
    a,b,k = map(int,input().split())
    ansSet = set()


    if a+k > b:
        c = b
    else:
        c = a+k
    
    if a == c:
        c += 1

    for i in range(a,c):
        ansSet.add(i)
    
    if b-k < a:
        c = a
    else:
        c = b-k

    for i in range(b,c,-1):
        ansSet.add(i)

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


if __name__== "__main__":
    main()
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k = list(map(int, input().split()))
for i in range(k):
	print(a+i)
for i in range(k):
	print(b-k+i+1)

Failing test case input:
2 9 110

Expected output:
2
3
4
5
6
7
8
9


Actual output:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9


Fixed submission (verdict: Accepted):
a,b,k = list(map(int, input().split()))
for i in range(k):
	if a+i <= b:
		print(a+i)
for i in range(k):
	if b-k+i+1 >= a+k:
		print(b-k+i+1)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k=map(int,input().split())
r=range(a,b+1)
for i in sorted(set(r[k:])|set(r[-k:])):print(i)

Failing test case input:
2 17 6

Expected output:
2
3
4
5
6
7
12
13
14
15
16
17


Actual output:
8
9
10
11
12
13
14
15
16
17


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
r=range(a,b+1)
for i in sorted(set(r[:k])|set(r[-k:])):print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
f = [i for i in range(a,b+1)]
ans = f[:k]
ans_d = f[-k:]
half = len(f)
if k > half:
    r = k-half
    del ans[-r:]
    del ans_d[:r]
ans += ans_d
for i in ans:
    print(i)


Failing test case input:
6 8 3

Expected output:
6
7
8


Actual output:
6
7
8
6
7
8


Fixed submission (verdict: Accepted):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
if (b-a+1) 
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())
l1 = min(b, a + k)
r1 = max(a, b - k)
if l1 < r1:
    l = [x for x in range(a, l1)]
    r = [x for x in range(b, r1, -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
c = 0
for x in lr:
    if c != x:
        c = x
        print(c)

Failing test case input:
0 14 3

Expected output:
0
1
2
12
13
14


Actual output:
1
2
12
13
14


Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())
if a + k <= b - k:
    l = [x for x in range(a, min(b, a + k))]
    r = [x for x in range(b, max(a, b - k), -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
for x in lr:
    print(x)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())
list1 = [i for i in range(A, A+K)]
list2 = [i for i in range(B+1-K, B+1)]
for i in list1:
    print(i)
for i in list2:
    if i not in list1:
        print(i)

Failing test case input:
1 6 110

Expected output:
1
2
3
4
5
6


Actual output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
-103
-102
-101
-100
-99
-98
-97
-96
-95
-94
-93
-92
-91
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
list = [i for i in range(A, A+K)]
list.extend(i for i in range(B+1-K, B+1))
list = sorted(set(list))
for i in list:
    if A<=i<=B:
        print(i)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if b-a>c*2:
  for i in range(a,a+c):
    print(i)
  for i in range(b-c+1,b+1):
    print(i)
else:
  for i in range(a,b+1):
    print(i)

Failing test case input:
1 13 6

Expected output:
1
2
3
4
5
6
8
9
10
11
12
13


Actual output:
1
2
3
4
5
6
7
8
9
10
11
12
13


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if b-a+1>c*2:
  for i in range(a,a+c):
    print(i)
  for i in range(b-c+1,b+1):
    print(i)
else:
  for i in range(a,b+1):
    print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int,input().split())
for i in range(1, min(a + k + 1, b + 1)):
  print(i)
for i in range(max(b - k, a + k + 1, b + 1)):
  print(i)
  

Failing test case input:
4 17 100

Expected output:
4
5
6
7
8
9
10
11
12
13
14
15
16
17


Actual output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104


Fixed submission (verdict: Accepted):
a, b, k = map(int,input().split())
for i in range(a, min(a + k, b + 1)):
  print(i)
for i in range(max(b - k + 1, a + k), b + 1):
  print(i)

Problem: p03386
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B,K = map(int,input().split())
if A-B+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)

Failing test case input:
0 8 3

Expected output:
0
1
2
6
7
8


Actual output:
0
1
2
3
4
5
6
7
8


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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())

res = []

for i in range(a, min(a+k, b)):
    res.append(i)

for j in range(max(a, b-k)+1, b+1):
    res.append(j)

for k in sorted(set(res)):
    print(k)

Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())

res = []

for i in range(a, min(a+k, b+1)):
    res.append(i)

for j in range(max(a, b-k+1), b+1):
    res.append(j)

for k in sorted(set(res)):
    print(k)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k=map(int,input().split())

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

ans=list(set(x))
for i in ans:
  print(i)

Failing test case input:
-4 14 7

Expected output:
-4
-3
-2
-1
0
1
2
8
9
10
11
12
13
14


Actual output:
0
1
2
8
9
10
11
12
13
14
-1
-4
-3
-2


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())

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

ans=list(set(x))
ans.sort()
for i in ans:
  print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
-4 14 5

Expected output:
-4
-3
-2
-1
0
10
11
12
13
14


Actual output:
0
10
11
12
13
14
-1
-4
-3
-2


Fixed submission (verdict: Accepted):
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 = sorted(set(num))

for s in ans:
    print(s)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    A, B, K = map(int, input().split())
    ans = set()
    for i in range(A, min(B, A + K)):
        ans.add(i)
    for i in range(B, max(A, B - K), -1):
        ans.add(i)
    for x in sorted(list(ans)):
        print(x)


if __name__ == '__main__':
    main()


Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    A, B, K = map(int, input().split())
    ans = set()
    for i in range(A, min(B + 1, A + K)):
        ans.add(i)
    for i in range(B, max(A - 1, B - K), -1):
        ans.add(i)
    for x in sorted(list(ans)):
        print(x)


if __name__ == '__main__':
    main()

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k = map(int,input().split())

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

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

Failing test case input:
1 7 7

Expected output:
1
2
3
4
5
6
7


Actual output:
1
2
3
4
5
6
7
1
2
3
4
5
6
7


Fixed submission (verdict: Accepted):
a,b,k = map(int,input().split())

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

print('\n'.join(map(str,sorted(set(min_li+max_li)))))
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	k = int(s[2])

	l1 = [a+x for x in range(k) if a+x < b]
	l2 = [b-x for x in range(k) if b-x > a]
	nums = list(set(l1+l2))

	for elm in sorted(nums):
		print(elm)


Failing test case input:
6 6 110

Expected output:
6


Actual output:

Fixed submission (verdict: Accepted):
if __name__ == '__main__':
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	k = int(s[2])


	l1 = [a+x for x in range(k) if a+x <= b]
	l2 = [b-x for x in range(k) if b-x >= a]
	nums = set(l1+l2)

	for elm in sorted(nums):
		print(elm)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

A, B, K = na()

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

for i in range(max(B, A + K), B + 1):
    print(i)

Failing test case input:
0 12 010

Expected output:
0
1
2
3
4
5
6
7
8
9
10
11
12


Actual output:
0
1
2
3
4
5
6
7
8
9
10
12


Fixed submission (verdict: Accepted):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

A, B, K = na()

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

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int,input().split()))
a = 0
k  = []
for c in range(A[0],A[1]+1):
  print(c)
  a += 1
  if a== A[2]:
    break;
a = 0
for c in range(A[1], A[0], -1):
  if a == A[2]:
    break;
  k.append(c)
  a += 1
k = sorted(k)
for i in k:
  print(i)

Failing test case input:
5 14 110

Expected output:
5
6
7
8
9
10
11
12
13
14


Actual output:
5
6
7
8
9
10
11
12
13
14
6
7
8
9
10
11
12
13
14


Fixed submission (verdict: Accepted):
A = list(map(int,input().split()))
a = 0
k  = []
for c in range(A[0],A[1]+1):
  k.append(c)
  a += 1
  if a== A[2]:
    break;
a = 0
for c in range(A[1], A[0], -1):
  if a == A[2]:
    break;
  k.append(c)
  a += 1
k = sorted(list(set(k)))
for i in k:
  print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k = map(int,input().split())
ans = []
for i in range(k):
  ans.append(a+i)
  ans.append(b-i)
ans.sort()
last = 'null'
for i in range(len(ans)):
  if ans[i] != last:
    print(ans[i])
  last = ans[i]

Failing test case input:
4 23 110

Expected output:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23


Actual output:
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113


Fixed submission (verdict: Accepted):
a,b,k = map(int,input().split())
ans = []
for i in range(k):
  if a <= a+i <= b:
    ans.append(a+i)
  if a <= b-i <= b:
    ans.append(b-i)
ans.sort()
last = 'null'
for i in range(len(ans)):
  if ans[i] != last:
    print(ans[i])
  last = ans[i]

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
4 8 3

Expected output:
4
5
6
7
8

Actual output:
4
5
6
6
7
8


Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
ret = range(A, B + 1)
for i in sorted(set(ret[:K]) | set(ret[-K:])):
    print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys



def solve(lines):
    A,B,K = map(int, lines.pop(0).split(' '))
    NLIST = set()
    for i in range(K):
        NLIST.add(A+i)
        NLIST.add(B-i)

    NLIST = list(NLIST)
    NLIST.sort()
    for i in NLIST:
        print(i)

                


lines = [x.strip() for x in sys.stdin.readlines()]

                                                  


solve(lines)

Failing test case input:
3 9 100

Expected output:
3
4
5
6
7
8
9


Actual output:
-90
-89
-88
-87
-86
-85
-84
-83
-82
-81
-80
-79
-78
-77
-76
-75
-74
-73
-72
-71
-70
-69
-68
-67
-66
-65
-64
-63
-62
-61
-60
-59
-58
-57
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-23
-22
-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102


Fixed submission (verdict: Accepted):

import sys



def solve(lines):
    A,B,K = map(int, lines.pop(0).split(' '))
    NLIST = set()
    for i in range(K):
        if A+i <= B:
            NLIST.add(A+i)
        if A <= B-i:
            NLIST.add(B-i)

    NLIST = list(NLIST)
    NLIST.sort()
    for i in NLIST:
        print(i)




lines = [x.strip() for x in sys.stdin.readlines()]




solve(lines)

Problem: p03386
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    a, b, k = map(int, input().split())
    if (a+b) / 2 <= a+k:
        for i in range(a, b+1):
            print(i)
    else:
        for i in range(a, a+k):
            print(i)
        for i in range(b-k+1, b+1):
            print(i)
resolve()

Failing test case input:
2 4 001

Expected output:
2
4


Actual output:
2
3
4


Fixed submission (verdict: Accepted):
def resolve():
    a, b, k = map(int, input().split())
    if a+k-1 >= b-k+1:
        for i in range(a, b+1):
            print(i)
    else:
        for i in range(a, a+k):
            print(i)
        for i in range(b-k+1, b+1):
            print(i)
resolve()

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  if A + i < B:
    ans.append(A + i)
  if B - i > A:
    ans.append(B - i)
ANS = list(set(ans))
ANS.sort()
[print(j) for j in ANS]

Failing test case input:
6 6 110

Expected output:
6


Actual output:

Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  if A + i <= B:
    ans.append(A + i)
  if B - i >= A:
    ans.append(B - i)
ANS = list(set(ans))
ANS.sort()
[print(j) for j in ANS]