ZhenlongDai/ACPR huggingface dataset:
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)
else:
    for i in range(a,b+1)[:k]:
        print(i)
    
    for i in range(a,b+1)[-k:]:
        print(i)
    

Failing test case input:
0 8 6

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


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


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

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

if b-a >= k+1:
    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:
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())

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

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


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

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

print(sorted(set(l)))


Failing test case input:
5 6 110

Expected output:
5
6


Actual output:
[5, 6]


Fixed submission (verdict: Accepted):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

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

ll = sorted(set(l))
for i in range(len(ll)):
    print(ll[i])
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 - 1, B + 1):
        print(i)


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
34
35


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 = list(map(int, input().split()))
left = set(list(range(A, A + K)))
right = set(list(range(B - K + 1, B + 1)))
[print(i) for i in sorted(list((left | right)))]


Failing test case input:
0 9 110

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


Actual output:
-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 = list(map(int, input().split()))
left = set(list(range(A, min(B, A + K))))
right = set(list(range(max(B - K + 1, A) , B + 1)))
[print(i) for i in sorted(list((left | right)))]

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

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

Failing test case input:
-1 9 011

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


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


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

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

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

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

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

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

for i in li1:
    print(i)



Failing test case input:
-2 14 6

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


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


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

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

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

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int, input().split())
L = []
for a in range(A, min(A + K, B)):
    L.append(a)
for b in range(max(B - K + 1, A + 1), B + 1):
    if b not in L:
        L.append(b)
for l in L:
    print(l)


Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
A, B, K = map(int, input().split())
L = []
for a in range(A, min(A + K, B + 1)):
    L.append(a)
for b in range(max(B - K + 1, A + 1), B + 1):
    if b not in L:
        L.append(b)
for l in L:
    print(l)

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

data = input().split(" ");
A = data[0];
B = data[1];
K = data[2];

for lop in range(int(A),int(A)+int(K)):
    print(lop);
    fg = lop;
        
if int(B)-int(K)+1 >= int(A):
    if fg+1 < int(B)-int(K)+1:
        fg = int(B)-int(K)+1;
    else:
        fg+=1
    for lop in range(fg,int(B)):
        print(lop);
    print(B);

Failing test case input:
2 4 110

Expected output:
2
3
4


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


Fixed submission (verdict: Accepted):

data = input().split(" ");
A = data[0];
B = data[1];
K = data[2];

for lop in range(int(A),int(A)+int(K)):
    if lop > int(B):
        break;
    print(lop);
    fg = lop;
        
if int(B)-int(K)+1 >= int(A):
    if fg+1 < int(B)-int(K)+1:
        fg = int(B)-int(K)+1;
    else:
        fg+=1
    for lop in range(fg,int(B)+1):
        print(lop);

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)
    exit(0)
for i in range(a,a+k):
    print(i)
for i in range(b-k+1,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+1 < 2*k:
    for i in range(a,b+1):
        print(i)
    exit(0)
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())
ans=[]
for i in range(a,min(a+k,b)):
    ans.append(i)
for j in range(max(a,b-k+1),b+1):
    ans.append(j)
ans=sorted(list(set(ans)))
print(ans)
for i in range(len(ans)):
    print(ans[i])

Failing test case input:
-4 6 7

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


Actual output:
[-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]
-4
-3
-2
-1
0
1
2
3
4
5
6


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b)):
    ans.append(i)
for j in range(max(a,b-k+1),b+1):
    ans.append(j)
ans=sorted(list(set(ans)))
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())
s=[]
for i in range(k):
    s.append(a+i)
    s.append(b-i)
s=sorted(list(set(s)))
for i in range(len(s)):
    print(s[i])

Failing test case input:
-2 -1 5

Expected output:
-2
-1


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


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
s=[]
for i in range(k):
    s.append(a+i)
    s.append(b-i)
s=sorted(list(set(s)))
for i in range(len(s)):
    if a<=s[i]<=b: print(s[i])

Problem: p03386
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a,b,k = map(int,input().split())
A=[]
for i in range(a,a+k):
    A.append(i)
B=[]
for i in range(b,b-k,-1):
    B.append(i)
C=list(set(A+B))
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])

Failing test case input:
5 14 110

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


Actual output:
-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
112
113
114


Fixed submission (verdict: Accepted):
a,b,k = map(int,input().split())
A=[]
for i in range(a,min(a+k,b+1)):
    A.append(i)
B=[]
for i in range(b,max(b-k,a-1),-1):
    B.append(i)
C=list(set(A+B))
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])
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())
if b-a<=k*2:
  for i in range(a,b+1,1):
    print(i)
else:
  for i in range(a,a+k,1):
    print(i)
  for j in range(b-k+1,b+1,1):
    print(j)

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

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)]
for x in lr:
    print(x)


Failing test case input:
6 6 110

Expected output:
6


Actual output:

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,C=map(int,input().split())
L=[]
for i in range (C):
	L.append(A+i)
	L.append(B-i)
X=sorted(L)
for i in range (len(X)):
	print(X[i])

Failing test case input:
2 9 100

Expected output:
2
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
2
3
3
4
4
5
5
6
6
7
7
8
8
9
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


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
L=[]
for i in range (C):
	if A+i>=A and A+i<=B:
		L.append(A+i)
	if B-i>=A and B-i<=B:
		L.append(B-i)
X=sorted(set(L))
for i in range (len(X)):
	print(X[i])
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = list(map(int, input().split()))
res=[]

if x[0]+x[2]>x[1]-x[2]:
    for i in range(x[0],x[1]+1):
        print(i)
    quit()

for i in range(x[0],x[0]+x[2]):
    res.append(i)
for i in range(x[1]-x[2]+1,x[1]+1):
    res.append(i)

print(res)

Failing test case input:
1 22 1

Expected output:
1
22


Actual output:
[1, 22]


Fixed submission (verdict: Accepted):
x = list(map(int, input().split()))
res=[]

if x[0]+x[2]-1>=x[1]-x[2]:
    for i in range(x[0],x[1]+1):
        print(i)
    quit()

for i in range(x[0],x[0]+x[2]):
    res.append(i)
for i in range(x[1]-x[2]+1,x[1]+1):
    res.append(i)

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

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

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

Failing test case input:
6 6 110

Expected output:
6


Actual output:

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

Problem: p03386
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A,B,K=map(int,input().split())
C=[]
D=[]
for i in range(K):
    C.append(A+i)
for i in range(K):
    D.append(B-i)
E=C+D
E.sort()
F=list(set(E))
for i in range(len(F)):
    print(F[i])

Failing test case input:
0 7 110

Expected output:
0
1
2
3
4
5
6
7


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
-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):
A,B,K=map(int,input().split())
C=[]
D=[]
for i in range(K):
    if A+i<=B:
        C.append(A+i)
for i in range(K):
    if B-i>=A:
        D.append(B-i)
E=C+D
E.sort()
F=list(set(E))
F.sort()
for i in range(len(F)):
    print(F[i])
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())
l = [i for i in range(a, b+1)]

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

for i in l[len(l)-k:]:
    if not(i in ans):
        ans.append(i)

for i in ans:
    print(i)


Failing test case input:
1 13 011

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


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


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

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

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

for i in ans:
    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,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)

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 = 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.8.2), verdict: Wrong Answer):
A,B,K=map(int,input().split())
C=set()
for i in range(A,min(A+K,B+1)):
  C.add(i)
for i in range(max(B-K+1,A),B+1):
  C.add(i)
for x in C:
  print(x)

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())
C=set()
for i in range(A,min(A+K,B+1)):
  C.add(i)
for i in range(max(B-K+1,A),B+1):
  C.add(i)
for x in sorted(list(C)):
  print(x)

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

t = set()
for i in range(a, min(a + k,b)):
    t.add(i)

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

l = sorted(list(t))

for i in l:
    print(i)

Failing test case input:
4 35 011

Expected output:
4
5
6
7
8
9
10
11
12
13
14
25
26
27
28
29
30
31
32
33
34
35


Actual output:
4
5
6
7
8
9
10
11
12
13
14
26
27
28
29
30
31
32
33
34
35


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

t = set()
for i in range(min(k, b-a+1)):
    t.add(a+i)
    t.add(b-i)

l = sorted(list(t))

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


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())
ans = []
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)

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

Failing test case input:
3 8 2

Expected output:
3
4
7
8

Actual output:
8
3
4
7


Fixed submission (verdict: Accepted):
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)
wa=sorted(list(wa))
for i in wa:
    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(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):

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

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

Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
a,b,x=map(int,input().split())
x=min(b-a,x)
if x==0:
    print(a)
    exit()
for i in range(x):
    print(a)
    a+=1
x=max(a-1,b-x)
for i in range(x+1,b+1):
    print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = (int(i) for i in input().split())

ans = []

for i in range(A, A+K):
    ans.append(i)

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

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


Failing test case input:
6 6 110

Expected output:
6


Actual output:
[-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, 112, 113, 114, 115]


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

ans = []

for i in range(A, A+K):
    ans.append(i)
    if i == B:
        break

for j in range(B, B-K, -1):
    ans.append(j)
    if j == A:
        break

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

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

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+1<=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)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, K = [int(i) for i in input().split()]

numbers = set() 
for i in range(A, A+K):
    if i <= B:
        numbers.add(i)
    
for j in range(B-K, B):
    if j >= A:
        numbers.add(j+1)
    
for n in numbers:
    print(n)

Failing test case input:
-1 14 6

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


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


Fixed submission (verdict: Accepted):
A, B, K = [int(i) for i in input().split()]

numbers = set() 
for i in range(A, A+K):
    if i <= B:
        numbers.add(i)
    
for j in range(B-K, B):
    if j >= A:
        numbers.add(j+1)
        
numbers = sorted(numbers)

for n in numbers:
    print(n)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys, os

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

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

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

solve()


Failing test case input:
-2 14 5

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


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


Fixed submission (verdict: Accepted):
import sys, os

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

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

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

solve()

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k = map(int,input().split())
hidari = [i for i in range(a,a+k)]
migi = [j for j in range(b,b-k,-1)]
for i in migi:
    if i not in hidari:
        hidari.append(i)
hidari.sort()
for j in hidari:
    print(j)

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):
a,b,k = map(int,input().split())
if b-a+1 >= k:
    hidari = [i for i in range(a,a+k)]
    migi = [j for j in range(b,b-k,-1)]
    for i in migi:
        if i not in hidari:
            hidari.append(i)
    hidari.sort()
    for k in hidari:
        print(k)
else:
    for h in range(a,b+1):
        print(h)

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


l = [i for i in range(a, min(b-1,a+k))] + [i for i in range(b, max(a-1,b-k),-1)]
l = list(set(l))
l.sort()

for i in l:
    print(i)


Failing test case input:
4 5 001

Expected output:
4
5


Actual output:
5


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


l = [i for i in range(a, min(b+1,a+k))] + [i for i in range(b, max(a-1,b-k),-1)]
l = list(set(l))
l.sort()

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

if abs(a-b)+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)



Failing test case input:
4 14 3

Expected output:
4
5
6
12
13
14


Actual output:
4
5
6
14
13
12


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

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

else:
  nList = []
  for i in range(k):
    nList.append(a+i)
    nList.append(b-i)

  for i in sorted(nList):
    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)
*al,=range(a,a+k)
*al2,=range(b-k+1,b+1)
ans=al+al2
ans=list(set(ans))
ans.sort()
for i in ans:print(i)



Failing test case input:
4 4 001

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
a,b,k=map(int, input().split())
k=min(k,b-a+1)
*al,=range(a,a+k)
*al2,=range(b-k+1,b+1)
ans=al+al2
ans=list(set(ans))
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())
ans = []
for i in range(A,min(A+K,B)):
    ans.append(i)
for j in range(max(A,B-K+1),B+1):
    ans.append(j)
ans = list(set(ans))
for h in ans:
    print(h)

Failing test case input:
4 9 2

Expected output:
4
5
8
9


Actual output:
8
9
4
5


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

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

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

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())
numlist=[]

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

for i in range(k):
    numlist.append(a+i)
    numlist.append(b-i)
numlist=sorted(list(set(numlist)))
for item in numlist:
    print(item)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())
a_upper = min(b, a+k)
b_lower = max(a, b-k)
u = set(range(a, a_upper+1))
v = set(range(b_lower, b+1))
for i in sorted(list(u|v)):
  print(i)

Failing test case input:
0 11 3

Expected output:
0
1
2
9
10
11


Actual output:
0
1
2
3
8
9
10
11


Fixed submission (verdict: Accepted):
a, b, k = map(int, input().split())
a_upper = min(b, a+k-1)
b_lower = max(a, b-k+1)
u = set(range(a, a_upper+1))
v = set(range(b_lower, b+1))
for i in sorted(list(u|v)):
  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(0,k):
  ans.append(a+i)
  ans.append(b-i)
ans=list(set(ans))
ans.sort()
print(ans)

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

Problem: p03386
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,k=map(int,input().split())
ans=[]
num_min=a+k
num_max=b-k+1
if k<b:
    for i in range(a,num_min):
        ans.append(i)
    for i in range(num_max,b+1):
        ans.append(i)
else:
    for i in range(a,b+1):
        ans.append(i)
ans=sorted(set(ans))
for i in ans:
    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())
ans=[]
num_min=a+k
num_max=b-k+1
if (b-a+1)>2*k:
    for i in range(a,num_min):
        ans.append(i)
    for i in range(num_max,b+1):
        ans.append(i)
else:
    for i in range(a,b+1):
        ans.append(i)
ans=sorted(set(ans))
for i in ans:
    print(i)

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

Failing test case input:
4 35 001

Expected output:
4
35


Actual output:
4
5
34
35


Fixed submission (verdict: Accepted):
A,B,K=map(int,input().split())
if B==A:
    print(A)
    exit()
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)

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:
-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 a == b:
    print(a)
    quit()
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)

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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, a + k), b + 1):
  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:
-4
-3
-2
-1
0
1
2
7
8
9
10
11
12
13
14


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 (Python (3.4.3), verdict: Wrong Answer):
A, B, K = map(int,input().split())
ans = []
for i in range(K):
    if A + i <= B and A <= B - i:
        ans.append(A + i)
        ans.append(B - i)

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

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
6
-1
-4
-3
-2


Fixed submission (verdict: Accepted):
A, B, K = map(int,input().split())
ans = []
for i in range(K):
    if A + i <= B and A <= B - i:
        ans.append(A + i)
        ans.append(B - i)

ans = set(ans)

for i in sorted(ans):
    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(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:
2 4 001

Expected output:
2
4


Actual output:
2
3
4


Fixed submission (verdict: Accepted):

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

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 h in range(b-a+1):
        print(a + h)
else:
    for i in range(k):
        print(a + i)
    for m in range(k):
        print((b-k)+1+m)

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]) or set(r[-k:])):
    print(i)

Failing test case input:
-1 14 6

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


Actual output:
-1
0
1
2
3
4


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

res = []

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

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

Failing test case input:
2 3 110

Expected output:
2
3


Actual output:
[2]
1
2
3


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.8.2), verdict: Wrong Answer):
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
N = []
if B-A>K:
  for i in range(A, A+K):
    N.append(i)
  for i in range(B-K, B+1):
    if not i in N:
      N.append(i)
  print(i)
else:
  for i in range(A, B+1):
    if i < A + K:
      print(i)
    elif i > B-K:
      print(i)

Failing test case input:
6 38 010

Expected output:
6
7
8
9
10
11
12
13
14
15
29
30
31
32
33
34
35
36
37
38


Actual output:
38


Fixed submission (verdict: Accepted):
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
N = []
if B-A>K:
  for i in range(A, A+K):
    print(i)
    N.append(i)
  for i in range(B-K+1, B+1):
    if not i in N:
      print(i)

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

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

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

ans = []
for i in range(a,b+1):
    ans.append(i)

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

for y in range(-k, 0):
    print(ans[y])

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)  < k * 2:
    for i in range(a, b+1):
        print(i)
    exit()
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())
ans = set([])
for _ in range(k):
    ans.add(a)
    a += 1
    ans.add(b)
    b -= 1
ans = list(ans)
ans.sort()
print("\n".join(list(map(str, ans))))


Failing test case input:
0 32 110

Expected 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


Actual output:
-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())
ans = set([])
num_a, num_b = a, b
for _ in range(k):
    if num_a <= b:
        ans.add(num_a)
        num_a += 1
    if a <= num_b:
        ans.add(num_b)
        num_b -= 1
ans = list(ans)
ans.sort()
print("\n".join(list(map(str, ans))))

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

ans = []

for i in range(A, A+K):
    ans.append(i)

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

ans.sort()
print(ans)


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 = (int(i) for i in input().split())

ans = []

for i in range(A, A+K):
    ans.append(i)
    if i == B:
        break

for j in range(B, B-K, -1):
    ans.append(j)
    if j == A:
        break

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

Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k = map(int,input().split())
ans = []
for i in range(a,a+k):
    if i <= b:
        ans.append(i)
for i in range(b-k+1,b+1):
    if i >= a:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)

Failing test case input:
4 15 100

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


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


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

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

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
10
11
12
13
14


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

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

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)

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


if __name__== "__main__":
    main() 






Failing test case input:
4 4 001

Expected output:
4


Actual output:

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

Failing test case input:
4 15 100

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


Actual output:
-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


Fixed submission (verdict: Accepted):
a,b,k= map(int, input().split())
c = min(k, b-a+1)
x = [a+i for i in range(c)]
y = [b-i for i in range(c)]
z = sorted(list(set(x+y)))
for i in z:
    print(i)
Problem: p03386
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, k = map(int, input().split())

nums = set()
for i in range(k):
    
    nums.add(a)
    a += 1
    if a > b:
        break
for j in range(k):
    
    nums.add(b)
    b -= 1
    if a > b:
        break

for k in nums:
    print(k)


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

nums = set()
for i in range(k):
    
    nums.add(a)
    a += 1
    if a > b:
        break
for j in range(k):
    
    nums.add(b)
    b -= 1
    if a > b:
        break

nums = sorted(nums)
for k in nums:
    print(k)

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

Failing test case input:
0 23 110

Expected 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


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


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