ZhenlongDai/ACPR huggingface dataset:
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k=list(map(int,input().split()))
k.sort()
print( abs(k[2]-k[1]) + abs(k[1]-k[2]))

Failing test case input:
4 1 -151

Expected output:
155


Actual output:
6


Fixed submission (verdict: Accepted):
k=list(map(int,input().split()))
k.sort() 
print( abs(k[0]-k[1]) + abs(k[1]-k[2]))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
cost = 0
a, b, c = (map(int, input().split()))
tasks = [a, b, c]

tasks.remove(max(tasks))
cost += 0

task = min(tasks)
tasks.remove(task)
cost += task

cost += (tasks[0] - task)
print(cost)


Failing test case input:
-1 8 -133

Expected output:
141


Actual output:
-1


Fixed submission (verdict: Accepted):
cost = 0
a, b, c = (map(int, input().split()))
tasks = [a, b, c]

tasks.sort()

j = min(tasks)
tasks.remove(j)

for i in tasks:
    cost += (i - j)
    j = i

print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools


def solve(A1,A2,A3):
    
    vec = [A1,A2,A3]
    com = list(itertools.permutations(vec))
    
    
    all_cos = [0,0,0,0,0,0]
    for i in range(6):
        tmp_com = com[i]
        
        tmp_A1 = tmp_com[0]
        tmp_A2 = tmp_com[1]
        tmp_A3 = tmp_com[2]
        
        cos1 = 0
        cos2 = abs(tmp_A1 - tmp_A2)
        cos3 = abs(tmp_A2 - tmp_A3)
        
        all_cos[i] = cos1 + cos2 + cos3
    
    res = min(all_cos)
    
    return res


Failing test case input:
2 0 -44

Expected output:
46


Actual output:

Fixed submission (verdict: Accepted):
import itertools

A1,A2,A3 = map(int,input().split())
    
vec = [A1,A2,A3]
com = list(itertools.permutations(vec))
    
all_cos = [0,0,0,0,0,0]
for i in range(6):
    tmp_com = com[i]
        
    tmp_A1 = tmp_com[0]
    tmp_A2 = tmp_com[1]
    tmp_A3 = tmp_com[2]
        
    cos1 = 0
    cos2 = abs(tmp_A1 - tmp_A2)
    cos3 = abs(tmp_A2 - tmp_A3)
        
    all_cos[i] = cos1 + cos2 + cos3
    
res = min(all_cos)
print(res)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split())) 
a.reverse()
for i in range(len(a)):
  if i == 0:
    res = 0
  else :
    res += a[i-1]-a[i]
print(res)

Failing test case input:
0 49 -2

Expected output:
51


Actual output:
-2


Fixed submission (verdict: Accepted):
a = list(map(int, input().split())) 
a.sort()
for i in range(len(a)):
  if i == 0:
    res = 0
  else :
    res += a[i]-a[i-1]
print(res)

Problem: p03292
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A = list(map(int, input().split()))

print(min(abs(A[0]-A[1])+abs(A[1]-A[2]), abs(A[0]-A[2])+abs(A[1]-A[2])))

Failing test case input:
100 111 001

Expected output:
110


Actual output:
121


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

print(min(abs(A[0]-A[1])+abs(A[1]-A[2]), abs(A[0]-A[2])+abs(A[1]-A[2]), abs(A[0]-A[1])+abs(A[0]-A[2])))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(a[2] - a[0])


Failing test case input:
1 12 3

Expected output:
11


Actual output:
2


Fixed submission (verdict: Accepted):
a = sorted(list(map(int, input().split())))[:: 1]
print(a[2] - a[0])

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

a=[int(i) for i in input().split()]
count=0
for i in range(1,2):
  count+=a[i+1]-a[i]
print(count)

Failing test case input:
100 111 010

Expected output:
101


Actual output:
-101


Fixed submission (verdict: Accepted):

a=[int(i) for i in input().split()]
count=0
a.sort()
for i in range(2):
  count+=abs(a[i+1]-a[i])
print(count)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
task = input().split()
task.sort()
score = int(task[2])  - int(task[0])
print(score)

Failing test case input:
-2 4 -69

Expected output:
73


Actual output:
6


Fixed submission (verdict: Accepted):
task = input().split()
for i, j in enumerate(task):
    task[i] = int(j)
task.sort()
score = int(task[2])  - int(task[0])
print(score)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = a.split(' ')
b.sort()
print(int(b[2])-int(b[0]))

Failing test case input:
14 3 -6

Expected output:
20


Actual output:
9


Fixed submission (verdict: Accepted):
a = input()
b = list(map(int,a.split()))
b.sort()
print(b[2]-b[0])

Problem: p03292
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools
a1, a2, a3 = map(int, input().split())
ans = 10 * 9
for v in itertools.permutations([a1, a2, a3]):
    d = 0
    for i in range(1, 3):
        d += abs(v[i]-v[i-1])
    ans = min(ans, d)
print(ans)


Failing test case input:
3 0 -89

Expected output:
92


Actual output:
90


Fixed submission (verdict: Accepted):
import itertools
a1, a2, a3 = map(int, input().split())
ans = 10 ** 9
for v in itertools.permutations([a1, a2, a3]):
    d = 0
    for i in range(1, 3):
        d += abs(v[i]-v[i-1])
    ans = min(ans, d)

print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stderr
from functools import reduce
from operator import add
def f(): return [int(i) for i in input().split()]
def debug(*x, sep=" ", end="\n"):
    for item in x:
        stderr.write(repr(item))
        stderr.write(sep)
    stderr.write(end)

a1,a2,a3 = f()

a = abs(a1-a2)
b = abs(a2-a3)
c = abs(a3-a1)
print(min(a,b,c))

Failing test case input:
0 -2 -70

Expected output:
70


Actual output:
2


Fixed submission (verdict: Accepted):
from sys import stderr
from functools import reduce
from operator import add
def f(): return [int(i) for i in input().split()]
def debug(*x, sep=" ", end="\n"):
    for item in x:
        stderr.write(repr(item))
        stderr.write(sep)
    stderr.write(end)

a1,a2,a3 = f()

a = abs(a1-a2)
b = abs(a2-a3)
c = abs(a3-a1)
print(min(a+b,b+c,c+a))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())
print(abs(a2 - a3) + min(abs(a2 - a1), abs(a3 -a1)))


Failing test case input:
0 2 -133

Expected output:
135


Actual output:
137


Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())
print(max(a1, a2, a3) - min(a1, a2, a3))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lst = list(map(int, input().split()))
sor = sorted(lst)
cost = 0
for i in range(len(sor)):
    if i == 0:
        continue
    else:
        cost = abs(sor[i]-sor[i-1])
print(cost)

Failing test case input:
4 1 -89

Expected output:
93


Actual output:
3


Fixed submission (verdict: Accepted):

lst = list(map(int, input().split()))
sor = sorted(lst)
cost = 0
for i in range(len(sor)):
    if i == 0:
        continue
    else:
        cost += abs(sor[i]-sor[i-1])
print(cost)

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

a,b,c = map(int,input().split())
print("{}".format(min(abs(a-b),abs(b-c),abs(c-a)))) 

Failing test case input:
2 1 -14

Expected output:
16


Actual output:
1


Fixed submission (verdict: Accepted):

a,b,c = map(int,input().split())
print("{}".format(min(abs(a-b)+abs(c-b),abs(a-c)+abs(b-c),abs(b-a)+abs(c-a))))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [int(x) for x in input().split()]

a.sort(reverse=True)

print(a[2] - a[0])

Failing test case input:
-1 0 36

Expected output:
37


Actual output:
-37


Fixed submission (verdict: Accepted):
a = [int(x) for x in input().split()]

a.sort(reverse=True)

print(abs(a[2] - a[1]) + abs(a[1] - a[0]))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())
x = abs(a1 - a2) + abs(a2 - a3)
y = abs(a1 - a3) + abs(a3 - a2)
if x < y:
    print(x)
else:
    print(y)


Failing test case input:
-2 1 -29

Expected output:
30


Actual output:
33


Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())
x = abs(a1 - a2) + abs(a2 - a3)
y = abs(a1 - a3) + abs(a1 - a2)
z = abs(a2 - a3) + abs(a1 - a3)
print(min(x, y, z))

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

A = sorted(list(map(int, input().split())))
print(A[2] - A[1] - A[0])

Failing test case input:
010 100 011

Expected output:
90


Actual output:
79


Fixed submission (verdict: Accepted):

A = sorted(list(map(int, input().split())))
print(A[2] - A[0])

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

print(min(abs(a-b)+abs(b-c),abs(a-c)+abs(b-c)))


Failing test case input:
6 39 -1

Expected output:
40


Actual output:
47


Fixed submission (verdict: Accepted):
a,b,c = list(map(int,input().split()))
ans = min(abs(a-b)+abs(b-c),abs(a-c)+abs(b-c),abs(a-b)+abs(a-c))
print(ans)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())

print(min(abs(b-a)+abs(b-c),abs(c-a)+abs(c-b)))

Failing test case input:
0 -2 59

Expected output:
61


Actual output:
63


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

print(min(abs(b-a)+abs(b-c),abs(c-a)+abs(c-b),abs(b-a)+abs(c-a)))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
ans = int(max(a))-int(min(a))
print(ans)


Failing test case input:
-2 3 -69

Expected output:
72


Actual output:
5


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
ans = (int(max(a))) - (int(min(a)))
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
icase=0
if icase==0:
    a1,a2,a3=map(int,input().split())
    a=min(abs(a2-a1)+abs(a3-a2),abs(a3-a2)+abs(a1-a3),abs(a1-a3)+abs(a2-a3))
    print(a)
    
    

Failing test case input:
100 111 010

Expected output:
101


Actual output:
112


Fixed submission (verdict: Accepted):
icase=103
if icase==103:
    a1,a2,a3=map(int,input().split())
    a=min(abs(a2-a1)+abs(a3-a2),abs(a3-a2)+abs(a1-a3),abs(a1-a3)+abs(a2-a1))
    print(a)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(max(a))
print(min(a))
ans = (int(max(a))) - (int(min(a)))
print(ans)


Failing test case input:
17 -1 1

Expected output:
18


Actual output:
17
-1
18


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
ans = (int(max(a))) - (int(min(a)))
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list = list(map(int, input().split()))

sum = 0
a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	if(a < c):
		if(b<c):
			print(a+b)
		else :
			print(a+c)
	else :
		print(c+a)
else :
	print(b+ c if (c < a) else a)

Failing test case input:
4 3 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
s = "100 10 25"
list = list(map(int, input().split()))


a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	print(b if b>c else c)
else :
	print(a if c<a else c)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = sorted(map(int,input().split()))
a[0]=0
cost = 0
for i in range(1,len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Failing test case input:
13 2 -6

Expected output:
19


Actual output:
11


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
a = sorted(a)
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A1,A2,A3 = map(int,input().split())
 
x = abs(A1 - A2)
y = abs(A2 - A3)
z = abs(A3 - A1)
 
if x + y <= y + z and x <= z + x:
	print(x + y )
elif y + z <= x + y and  y + z <= z + x:
	print(y + z )
else:
	print(z + x)

Failing test case input:
3 7 -51

Expected output:
58


Actual output:
62


Fixed submission (verdict: Accepted):
A1,A2,A3 = map(int,input().split())
 
x = abs(A1 - A2)
y = abs(A2 - A3)
z = abs(A3 - A1)
 
if x + y <= y + z and x + y <= z + x:
	print(x + y )
elif y + z <= x + y and  y + z <= z + x:
	print(y + z )
else:
	print(z + x)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())

totalCost = 0

Cost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]
Cost.sort()

totalCost = Cost[0] + Cost[1]


Failing test case input:
0 1 -23

Expected output:
24


Actual output:

Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())

Cost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]
Cost.sort()

print(Cost[0] + Cost[1])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    task_str = input().split()
    print(task_str)
    task_list = []
    task_list = [int(s, 10) for s in task_str]
    task_list.sort()
    print(task_list)
    result = int(task_list[2]) - int(task_list[0])
    print(result)

if __name__=='__main__':
    main()

Failing test case input:
3 0 -89

Expected output:
92


Actual output:
['3', '0', '-89']
[-89, 0, 3]
92


Fixed submission (verdict: Accepted):
def main():
    task_str = input().split()
    task_list = []
    task_list = [int(s, 10) for s in task_str]
    task_list.sort()
    result = task_list[2] - task_list[0]
    print(result)

if __name__=='__main__':
    main()

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[2] - a[0]),
          abs(a[0] - a[1]) + abs(a[2] - a[0]),
          abs(a[2] - a[0]) + abs(a[1] - a[0])
))


Failing test case input:
31 0 1

Expected output:
31


Actual output:
32


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[2] - a[0]),
          abs(a[0] - a[1]) + abs(a[2] - a[0]),
          abs(a[2] - a[0]) + abs(a[1] - a[0]),
          abs(a[0] - a[1]) + abs(a[1] - a[2]),
          abs(a[0] - a[2]) + abs(a[2] - a[1])
))

Problem: p03292
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = [int(x) for x in input().split()]
a1 = abs(a[1] - a[0]) + abs(a[1] - a[2])
a2 = abs(a[2] - a[0]) + abs(a[2] - a[1])
print(min(a1,a2))

Failing test case input:
-2 7 -29

Expected output:
36


Actual output:
45


Fixed submission (verdict: Accepted):
a = [int(x) for x in input().split()]
a1 = abs(a[1] - a[0]) + abs(a[1] - a[2])
a2 = abs(a[2] - a[0]) + abs(a[2] - a[1])
a3 = abs(a[2] - a[0]) + abs(a[1] - a[0])
print(min(a1,a2,a3))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>=E and D>=F:
  print(E+F)
elif E>=D and E>=F:
  print(D+F)
elif F>=D and F>=E:
  print(E+F)


Failing test case input:
-2 0 52

Expected output:
54


Actual output:
106


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

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>=E and D>=F:
  print(E+F)
elif E>=D and E>=F:
  print(D+F)
elif F>=D and F>=E:
  print(D+E)

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

a = list(map(int, input().split()))
cost=0
for i in range(0,1):
    cost+=abs(a[i]-a[i+1])
print(cost)

Failing test case input:
0 0 59

Expected output:
59


Actual output:
0


Fixed submission (verdict: Accepted):

a = list(map(int, input().split()))
cost=0
a.sort()

for i in range(2):
    cost+=abs(a[i+1]-a[i])
print(cost)

Problem: p03292
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a = list(map(int,input().split()))

a.sort()
print(a)
print(a[1]-a[0]+a[2]-a[1])

Failing test case input:
1 24 4

Expected output:
23


Actual output:
[1, 4, 24]
23


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

a.sort()
print(a[1]-a[0]+a[2]-a[1])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Failing test case input:
0 -1 59

Expected output:
60


Actual output:
59


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
a = sorted(a)
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools

A1,A2,A3 = map(int,input().split())
    
vec = [A1,A2,A3]
com = list(itertools.permutations(vec))
    
all_cos = [0,0,0,0,0,0]
for i in range(6):
    tmp_com = com[i]
        
    tmp_A1 = tmp_com[0]
    tmp_A2 = tmp_com[1]
    tmp_A3 = tmp_com[2]
        
    cos1 = 0
    cos2 = abs(tmp_A1 - tmp_A2)
    cos3 = abs(tmp_A2 - tmp_A3)
        
all_cos[i] = cos1 + cos2 + cos3
    
res = min(all_cos)
print(res)



Failing test case input:
-1 11 -30

Expected output:
41


Actual output:
0


Fixed submission (verdict: Accepted):
import itertools

A1,A2,A3 = map(int,input().split())
    
vec = [A1,A2,A3]
com = list(itertools.permutations(vec))
    
all_cos = [0,0,0,0,0,0]
for i in range(6):
    tmp_com = com[i]
        
    tmp_A1 = tmp_com[0]
    tmp_A2 = tmp_com[1]
    tmp_A3 = tmp_com[2]
        
    cos1 = 0
    cos2 = abs(tmp_A1 - tmp_A2)
    cos3 = abs(tmp_A2 - tmp_A3)
        
    all_cos[i] = cos1 + cos2 + cos3
    
res = min(all_cos)
print(res)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=list(map(int,input().split()))
l.sort()
print(l[1]+abs(l[1]-l[2]))


Failing test case input:
-1 -1 115

Expected output:
116


Actual output:
115


Fixed submission (verdict: Accepted):
l=list(map(int,input().split()))
l.sort()
print(abs(l[0]-l[1])+abs(l[1]-l[2]))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
array = list(map(int, input().split()))
array.sort()
print(array)

count=0
for i in range(1, len(array)):
    count += array[i] - array[i-1]
print(count)
    

Failing test case input:
-2 4 -69

Expected output:
73


Actual output:
[-69, -2, 4]
73


Fixed submission (verdict: Accepted):
array = list(map(int, input().split()))
array.sort()

count=0
for i in range(1, len(array)):
    count += array[i] - array[i-1]
print(count)

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

s=[abs(a-b),abs(a-c),abs(b-c)]
s.sort()
print(abs(s[0]-s[1]))

Failing test case input:
6 1 -89

Expected output:
95


Actual output:
85


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

s=[abs(a-b),abs(a-c),abs(b-c)]
s.sort()
print(s[0]+s[1])

Problem: p03292
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())
if (a1 <= a2 and a2 <= a3) and (a3 <= a2 and a2 <= a1):
    print(abs(a2 - a1) + abs(a3 - a2))
elif (a2 <= a1 and a1 <= a3) and (a3 <= a1 and a1 <= a2):
    print(abs(a1 - a2) + abs(a3 - a1))
else:
    print(abs(a3 - a1) + abs(a2 - a3))

Failing test case input:
0 -1 -44

Expected output:
44


Actual output:
87


Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())
if (a1 <= a2 and a2 <= a3) or (a3 <= a2 and a2 <= a1):
    print(abs(a2 - a1) + abs(a3 - a2))
elif (a2 <= a1 and a1 <= a3) or (a3 <= a1 and a1 <= a2):
    print(abs(a1 - a2) + abs(a3 - a1))
else:
    print(abs(a3 - a1) + abs(a2 - a3))

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

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

l = list(map(int, input().split()))
print(sum(l)-max(l))


Failing test case input:
1 24 3

Expected output:
23


Actual output:
4


Fixed submission (verdict: Accepted):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

l = list(map(int, input().split()))

l = sorted(l, reverse=True)
print(sum(a-b for a, b in zip(l, l[1:])))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
a.sort
ans = (a[2]-a[1])+(a[1]-a[0])
print(ans)

Failing test case input:
100 000 000

Expected output:
100


Actual output:
-100


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
a.sort()

ans = (a[2]-a[1])+(a[1]-a[0])
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = input().split()
num = [int(i) for i in num]
ans = 0
for i in range(1, 3):
  ans += num[i]-num[i-1]
print(ans)

Failing test case input:
5 3 0

Expected output:
5


Actual output:
-5


Fixed submission (verdict: Accepted):
num = input().split()
num = sorted([int(i) for i in num])
ans = 0
for i in range(1, 3):
  ans += num[i]-num[i-1]
print(ans)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=list(map(int,input().split()))
y=sorted(x)
print(y)
print(abs(y[0]-y[1])+abs(y[2]-y[1]))



Failing test case input:
1 24 4

Expected output:
23


Actual output:
[1, 4, 24]
23


Fixed submission (verdict: Accepted):
x=list(map(int,input().split()))
y=sorted(x)

print(abs(y[0]-y[1])+abs(y[2]-y[1]))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = sorted(input().split())
x = int(a[1])-int(a[0])
y = int(a[2])-int(a[1])
print(x + y)

Failing test case input:
0 -1 -44

Expected output:
44


Actual output:
1


Fixed submission (verdict: Accepted):
a = input().split()
nl = sorted(list(map(int, a)))
x = int(nl[1])-int(nl[0])
y = int(nl[2])-int(nl[1])
print(x + y)

Problem: p03292
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
bef=l[0]
for i in l:
  ans+=abs(bef-i)
print(ans)

Failing test case input:
4 8 -4

Expected output:
12


Actual output:
16


Fixed submission (verdict: Accepted):
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
bef=l[0]
for i in l:
  ans+=abs(bef-i)
  bef=i
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main(a: list):
    a = sorted(a)

    cost = 0

    cost += abs(a[0] - a[1])
    print(cost)
    cost += abs(a[1] - a[2])
    print(cost)

    return cost


if __name__ == '__main__':
    print(main(list(map(int, input().split(' ')))))


Failing test case input:
1 24 3

Expected output:
23


Actual output:
2
23
23


Fixed submission (verdict: Accepted):
def main(a: list):
    a = sorted(a)

    cost = 0

    cost += abs(a[0] - a[1])
    cost += abs(a[1] - a[2])

    return cost


if __name__ == '__main__':
    print(main(list(map(int, input().split(' ')))))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = [int(x) for x in input().split()]
print(a3-a1)

Failing test case input:
0 -1 38

Expected output:
39


Actual output:
38


Fixed submission (verdict: Accepted):
a1, a2, a3 = [int(x) for x in input().split()]
a1, a2, a3 = sorted([a1, a2, a3])
print(a3-a1)

Problem: p03292
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a_L = list(map(int,input().split()))
a_L = list(sorted(a_L))

cost = a_L[0]-a_L[1] + a_L[2]-a_L[1]
print(cost)

Failing test case input:
-4 0 52

Expected output:
56


Actual output:
48


Fixed submission (verdict: Accepted):
a_L = list(map(int,input().split()))
a_L = list(sorted(a_L))

cost = a_L[1]-a_L[0] + a_L[2]-a_L[1]
print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split()))
A.sort()
ans = abs(A[2]+A[1])+abs(A[1]+A[0])
print(ans)

Failing test case input:
2 -4 -47

Expected output:
49


Actual output:
53


Fixed submission (verdict: Accepted):
A = list(map(int, input().split()))
A.sort()
ans = abs(A[2]-A[1])+abs(A[1]-A[0])
print(ans)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(map(int,input().split()))
li.sort()

li[2]-li[1]+li[1]-li[0]

Failing test case input:
1 6 3

Expected output:
5

Actual output:

Fixed submission (verdict: Accepted):
li = list(map(int,input().split()))
li.sort()

print(li[2]-li[1]+li[1]-li[0])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=list(map(int,input().split()))
A.sort()
for i in range(len(A)):
  if i==0:
    continue
  else:
    res=A[i]-A[i-1]
print(res)

Failing test case input:
0 -1 85

Expected output:
86


Actual output:
85


Fixed submission (verdict: Accepted):
A=list(map(int,input().split()))
A.sort()
res=0
for i in range(len(A)):
  if i==0:
    continue
  else:
    res=res+A[i]-A[i-1]
print(res)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int,input().split())
A = []
A.append(a)
A.append(b)
A.append(c)
A.sort()
print(A)
print((A[1]-A[0])+(A[2]-A[1]))

Failing test case input:
0 0 59

Expected output:
59


Actual output:
[0, 0, 59]
59


Fixed submission (verdict: Accepted):
a, b, c = map(int,input().split())
A = []
A.append(a)
A.append(b)
A.append(c)
A.sort()
print((A[1]-A[0])+(A[2]-A[1]))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
li = list(map(int, input().split()))
li.sort()
print(li[0]-li[2])

Failing test case input:
010 100 011

Expected output:
90


Actual output:
-90


Fixed submission (verdict: Accepted):
li = list(map(int, input().split()))
li.sort()
print(li[2]-li[0])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
s1=d+e
s2=e+f
s3=f+d
l=[s1,s2,s3]
l.sort()
print(sum(l[:2]))

Failing test case input:
1 0 -145

Expected output:
146


Actual output:
293


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
s1=d+e
s2=e+f
s3=f+d
l=[s1,s2,s3]
l.sort()
print(l[0])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def Task(al):

    al.sort

    return (al[-1] - al[-2]) + (al[-2] - al[0])

def main():
    al = list(map(int , input().split()))
    print(Task(al))

if __name__ == '__main__':
    main()

Failing test case input:
14 12 -12

Expected output:
26


Actual output:
-26


Fixed submission (verdict: Accepted):
def Task(al):

    return max(al) - min(al)

def main():
    al = list(map(int , input().split()))
    print(Task(al))

if __name__ == '__main__':
    main()

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


list = list(map(int,input().split()))

print(list)

list.sort()
sum = 0;
sum = list[2]-list[1]+list[1]-list[0]

print(sum)


Failing test case input:
-2 3 -35

Expected output:
38


Actual output:
[-2, 3, -35]
38


Fixed submission (verdict: Accepted):


list = list(map(int,input().split()))
list.sort()
sum = list[2]-list[1]+list[1]-list[0]

print(sum)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
A=[a,b,c]
sorted(A)
print(abs(A[0]-A[1])+abs(A[1]-A[2]))

Failing test case input:
0 -1 38

Expected output:
39


Actual output:
40


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
A=[a,b,c]
A=sorted(A)
print(abs(A[0]-A[1])+abs(A[1]-A[2]))

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

def solve(a,b,c):
    f = [a,b,c]
    f.sort()
    
    x = 0
    y = 0

    if a == b and b == c :
        return 0
    else:
        x = f[1] - f[0]
        y = f[2] - f[1]
        return x+y

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())


    main()

Failing test case input:
2 0 -44

Expected output:
46


Actual output:

Fixed submission (verdict: Accepted):
import sys


def solve(a,b,c):
    f = [a,b,c]
    f.sort()
    
    x = 0
    y = 0

    if a == b and b == c :
        return 0
    else:
        x = f[1] - f[0]
        y = f[2] - f[1]
        return x+y

def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b, str_c] = line.split(' ')
    return (int(str_a), int(str_b), int(str_c))

def main():
    a, b, c = readQuestion()
    answer = solve(a, b, c)
    print(answer)
    
if __name__ == '__main__':
    main()

Problem: p03292
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = list(map(int,input().split()))
N.sort()

A = abs(abs(N[0]-N[1])-N[2])
print(A)

Failing test case input:
2 0 -44

Expected output:
46


Actual output:
42


Fixed submission (verdict: Accepted):
N = list(map(int,input().split()))
N.sort()

A = abs(N[0]-N[1])
B = abs(N[1]-N[2])

print(A+B)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a, b, c = (int(i) for i in input().split()) 
l = []
l.extend([abs(a-b),abs(b-c),abs(c-a)])
l.sort()
ans = l[0] + l[1]


Failing test case input:
110 111 110

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
import math
a, b, c = (int(i) for i in input().split()) 
l = []
l.extend([abs(a-b),abs(b-c),abs(c-a)])
l.sort()
ans = l[0] + l[1]
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]))


Failing test case input:
4 3 0

Expected output:
4


Actual output:

Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(
    min(
    [abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]), abs(a[0]-a[2])+abs(a[1]-a[2])]
    )
)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D<E and D<F:
  print(E+F)
elif E<D and E<F:
  print(D+F)
else:
  print(E+F)


Failing test case input:
3 0 -89

Expected output:
92


Actual output:
181


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

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>=E and D>=F:
  print(E+F)
elif E>=D and E>=F:
  print(D+F)
elif F>=D and F>=E:
  print(D+E)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
out=abs(a[0]-a[1])
for i in range(3):
    if i ==0:
        b=a[1]
        c=a[2]
    elif i==1:
        b=a[0]
        c=a[2]
    else:
        b=a[0]
        c=a[1]
    if (abs(b-c)<out):
        out=abs(b-c)
    if (abs(c-b)<out):
        out=abs(c-b)
print(out)

Failing test case input:
4 1 -89

Expected output:
93


Actual output:
3


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
out=abs(a[1]-a[0])+abs(a[2]-a[1])
for i in range(3):
    if i ==0:
        b=a[1]
        c=a[2]
    elif i==1:
        b=a[0]
        c=a[2]
    else:
        b=a[0]
        c=a[1]
    if ((abs(b-a[i])+abs(c-b))<out):
        out=abs(b-a[i])+abs(c-b)
    if ((abs(c-a[i])+abs(b-c))<out):
        out=abs(c-a[i])+abs(b-c)
print(out)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])))


Failing test case input:
110 001 010

Expected output:
109


Actual output:
118


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(
    min(
    [abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]), abs(a[0]-a[2])+abs(a[1]-a[2])]
    )
)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int,input().strip().split(' ')))
import itertools
m = 2 ^ 23
for l in itertools.permutations(A):
    tmp = abs(l[1]-l[0]) + abs(l[2]-l[1])
    m = min(m,tmp)
print(m)

Failing test case input:
-3 0 52

Expected output:
55


Actual output:
21


Fixed submission (verdict: Accepted):
A = list(map(int,input().strip().split(' ')))
import itertools
import sys

m = sys.maxsize
for l in itertools.permutations(A):
    tmp = abs(l[1]-l[0]) + abs(l[2]-l[1])
    m = min(m,tmp)
print(m)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(max(a[0] - a[1] + a[1] - a[2],
          a[1] - a[2] + a[2] - a[0],
          a[2] - a[0] + a[0] - a[1]))

Failing test case input:
0 4 -133

Expected output:
137


Actual output:
133


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[0] - a[2]),
          abs(a[0] - a[2]) + abs(a[2] - a[1])))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(max(abs(b-a),abs(c-a)))

Failing test case input:
-2 1 -29

Expected output:
30


Actual output:
27


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(max(a,b,c)-min(a,b,c))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int, input().split()))
a.sort
print(a[2]-a[0])

Failing test case input:
-2 1 -29

Expected output:
30


Actual output:
-27


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
a.sort()
print(a[2]-a[0])

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

S=list(map(int,input().split()))
S.sort
sum=0
sum += (S[2]-S[0])
print(sum)

Failing test case input:
4 3 0

Expected output:
4


Actual output:
-4


Fixed submission (verdict: Accepted):

S=list(map(int,input().split()))
S.sort()
sum=0
sum += (S[2]-S[0])
print(sum)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input().split()
A=sorted(S)
print(int(S[2])-int(S[0]))

Failing test case input:
0 2 -133

Expected output:
135


Actual output:
-133


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

print(A[2]-A[0])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
task = list(map(int, input().split()))
cost = 0
for i in range(2):
  cost += task[i+1] - task[i]
print(cost)

Failing test case input:
100 111 001

Expected output:
110


Actual output:
-99


Fixed submission (verdict: Accepted):
task = list(map(int, input().split()))
task = sorted(task)
cost = 0
for i in range(2):
  cost += task[i+1] - task[i]
print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
As = sorted(list(map(int, input().split())), reverse=True)

cost = 0
for a, b in zip(As[:-1], As[1:]):
  cost = abs(a-b)
  
cost -= As[0]
print(cost)

Failing test case input:
22 4 -12

Expected output:
34


Actual output:
-6


Fixed submission (verdict: Accepted):
As = sorted(list(map(int, input().split())), reverse=True)

cost = 0
for a, b in zip(As[:-1], As[1:]):
  cost += abs(a-b)

print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A1) + abs(A3-A2)
    cost2 = 0 + abs(A3-A1) + abs(A2-A3)
    cost3 = abs(A1-A2) + 0 + abs(A3-A1)
    cost4 = abs(A2-A3) + 0 + abs(A3-A2)
    cost5 = abs(A1-A3) + abs(A2-A1) + 0
    cost6 = abs(A1-A2) + abs(A2-A3) + 0

    print(min(cost1,cost2,cost3,cost4,cost5,cost6))

if __name__ == '__main__':

    ABC_103_A()

Failing test case input:
98 17 0

Expected output:
98


Actual output:
34


Fixed submission (verdict: Accepted):
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A3) + abs(A3-A1)
    cost2 = 0 + abs(A2-A1) + abs(A3-A2)
    cost3 = abs(A1-A2) + 0 + abs(A3-A1)
    cost4 = abs(A1-A3) + 0 + abs(A3-A2)
    cost5 = abs(A1-A3) + abs(A2-A1) + 0
    cost6 = abs(A1-A2) + abs(A2-A3) + 0

    print(min(cost1,cost2,cost3,cost4,cost5,cost6))

if __name__ == '__main__':

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

import sys
 
 
def solve(A: "List[int]"):
    print(abs(A[0] - A[1]) + abs(A[1] - A[2]))
    return
 
 

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  
    solve(A)
 
if __name__ == '__main__':
    main()

Failing test case input:
6 35 0

Expected output:
35


Actual output:
64


Fixed submission (verdict: Accepted):

import sys


def solve(A: "List[int]"):
    print(max(A) - min(A))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  
    solve(A)

if __name__ == '__main__':
    main()

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools

def solve(A1,A2,A3):
    
    vec = [A1,A2,A3]
    com = list(itertools.permutations(vec))
    
    
    all_cos = [0,0,0,0,0,0]
    for i in range(6):
        tmp_com = com[i]
        
        tmp_A1 = tmp_com[0]
        tmp_A2 = tmp_com[1]
        tmp_A3 = tmp_com[2]
        
        cos1 = 0
        cos2 = abs(tmp_A1 - tmp_A2)
        cos3 = abs(tmp_A2 - tmp_A3)
        
        all_cos[i] = cos1 + cos2 + cos3
    
    res = min(all_cos)
    print(res)
    
    return res


Failing test case input:
1 1 8

Expected output:
7


Actual output:

Fixed submission (verdict: Accepted):
import itertools

A1,A2,A3 = map(int,input().split())
    
vec = [A1,A2,A3]
com = list(itertools.permutations(vec))
    
all_cos = [0,0,0,0,0,0]
for i in range(6):
    tmp_com = com[i]
        
    tmp_A1 = tmp_com[0]
    tmp_A2 = tmp_com[1]
    tmp_A3 = tmp_com[2]
        
    cos1 = 0
    cos2 = abs(tmp_A1 - tmp_A2)
    cos3 = abs(tmp_A2 - tmp_A3)
        
    all_cos[i] = cos1 + cos2 + cos3
    
res = min(all_cos)
print(res)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int, input().split())
a=abs(A-B)
b=abs(A-C)
c=abs(B-C)


saidai=max(a,b,c)
kotae=a+b+c-saidai+1
print(kotae)

Failing test case input:
31 0 1

Expected output:
31


Actual output:
32


Fixed submission (verdict: Accepted):
A,B,C=map(int, input().split())
a=abs(A-B)
b=abs(A-C)
c=abs(B-C)


saidai=max(a,b,c)
kotae=a+b+c-saidai
print(kotae)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = "11 5 5"
list = list(map(int, s.split()))

a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	sum = a + b if b < c else c
else :
	sum = b + c if c < a else a
print(sum)


Failing test case input:
4 1 -89

Expected output:
93


Actual output:
6


Fixed submission (verdict: Accepted):
s = "100 10 25"
list = list(map(int, input().split()))


a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	print(b if b>c else c)
else :
	print(a if c<a else c)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
Tmp = []
Tmp = input().rstrip().split(' ')

Ans = []

for i in range(3):
  nTmp = int(Tmp[i])
  
  Ans.append(nTmp)

Ans.sort()

nAns = (Ans[1]-Ans[0])
nAns += Ans[2]-Ans[1]





Failing test case input:
-2 0 52

Expected output:
54


Actual output:

Fixed submission (verdict: Accepted):
Tmp = []
Tmp = input().rstrip().split(' ')
 
Ans = []
 
for i in range(3):
  nTmp = int(Tmp[i])
  
  Ans.append(nTmp)
 
Ans.sort()
 
nAns = (Ans[1]-Ans[0])
nAns += Ans[2]-Ans[1]

print(nAns)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
task=list(map(int,input().split(" ")))
print(task)
task.sort()
print(task)
cost=0

for i in range(len(task)-1):
    cost+=task[i+1]-task[i]
print(cost)

Failing test case input:
22 4 -12

Expected output:
34


Actual output:
[22, 4, -12]
[-12, 4, 22]
34


Fixed submission (verdict: Accepted):
task=list(map(int,input().split(" ")))
task.sort()
cost=0

for i in range(len(task)-1):
    cost+=task[i+1]-task[i]
print(cost)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [i for i in input().split()]

b = sorted(list(set(a)))
if len(b) == 1:
    print(0)
elif len(b) == 2:
    print(int(b[0])-int(b[1]))
else:
    print(int(b[2]) - int(b[0]))


print(b)


Failing test case input:
17 0 1

Expected output:
17


Actual output:
17
['0', '1', '17']


Fixed submission (verdict: Accepted):
a = [i for i in input().split()]

b = sorted(map(int, list(set(a))))

if len(b) == 1:
    print(0)
elif len(b) == 2:
    print(int(b[1])-int(b[0]))
else:
    print(int(b[2]) - int(b[0]))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] 
list1_1 = list1[1] 
list1_2 = list1[2] 

list2 = [list1_0, list1_1, list1_2]
list2.sort()
b = max(list2) - list2[1]
c = b - min(list2)
print(b + c)

Failing test case input:
-4 0 52

Expected output:
56


Actual output:
108


Fixed submission (verdict: Accepted):
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] 
list1_1 = list1[1] 
list1_2 = list1[2] 

list2 = [list1_0, list1_1, list1_2]
list2.sort()
b = max(list2) - list2[1]
c = list2[1] - min(list2)
print(b + c)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
import collections
import sys


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

AS=LI()
AS=sorted(AS)
ans=AS[2]-AS[1]+AS[1]-AS[0]
print(AS)

Failing test case input:
-3 0 52

Expected output:
55


Actual output:
[-3, 0, 52]


Fixed submission (verdict: Accepted):
import math
import collections
import sys
 

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
AS=LI()
AS=sorted(AS)
ans=AS[2]-AS[0]
print(ans)
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=(int(i) for i in input().split())
print(min((abs(B-A)+abs(C-B)),(abs(C-A)+abs(B-C))))

Failing test case input:
0 -1 59

Expected output:
60


Actual output:
61


Fixed submission (verdict: Accepted):
A,B,C=(int(i) for i in input().split())
print(min((abs(B-A)+abs(C-B)),(abs(C-A)+abs(B-C)),(abs(A-C)+abs(B-A))))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()));a.sort()
print(max(a[2]-a[1]*2-a[0],0))

Failing test case input:
96 16 0

Expected output:
96


Actual output:
64


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()));a.sort()
print(a[2]-a[0])

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(c-b)+abs(a-b)))

Failing test case input:
-1 46 -2

Expected output:
48


Actual output:
49


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(c-b)+abs(a-c),abs(a-b)+abs(c-a),abs(a-c)+abs(b-a)))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())
x = abs(a2 - a1) + abs(a3 - a2)
y = abs(a3 - a1) + abs(a2 - a3)
if x < y:
    print(x)
else:
    print(y)


Failing test case input:
-2 4 -69

Expected output:
73


Actual output:
79


Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())
x = abs(a1 - a2) + abs(a2 - a3)
y = abs(a1 - a3) + abs(a1 - a2)
z = abs(a2 - a3) + abs(a1 - a3)
print(min(x, y, z))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
print(abs(b-a)+abs(c-b))

Failing test case input:
3 7 -51

Expected output:
58


Actual output:
62


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(max(a) - min(a))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list = list(map(int, input().split()))

a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	print(a+b if b<c else c)
else :
	print(b+ c if (c < a) else a)


Failing test case input:
3 5 2

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
s = "100 10 25"
list = list(map(int, input().split()))


a = abs(list[1]-list[0])
b = abs(list[1]-list[2])
c = abs(list[2]-list[0])
if (a < b):
	print(b if b>c else c)
else :
	print(a if c<a else c)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
d,e,f=abs(a-b),abs(a-c),abs(b-c)
print(d+e+f-min(d,e,f))

Failing test case input:
1 1 -151

Expected output:
152


Actual output:
304


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
d,e,f=abs(a-b),abs(a-c),abs(b-c)
print(d+e+f-max(d,e,f))
Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = map(int, input().split())

cost1 = abs(a1 - a2) + abs(a2 - a3)
cost2 = abs(a1 - a3) + abs(a3 - a2)

print(cost1 if cost1 < cost2 else cost2)

Failing test case input:
-2 7 -29

Expected output:
36


Actual output:
45


Fixed submission (verdict: Accepted):
a1, a2, a3 = map(int, input().split())

cost1 = abs(a1 - a2) + abs(a2 - a3)
cost2 = abs(a1 - a3) + abs(a3 - a2)
cost3 = abs(a3 - a1) + abs(a1 - a2)

print(min((cost1, cost2, cost3)))

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a1, a2, a3 = [int(x) for x in input().split()]
print(min(a1, a2, a3))

Failing test case input:
1 24 4

Expected output:
23


Actual output:
1


Fixed submission (verdict: Accepted):
a1, a2, a3 = [int(x) for x in input().split()]
a1, a2, a3 = sorted([a1, a2, a3])
print(a3-a1)

Problem: p03292
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
tmp = list(map(lambda n : int(n), input().split(" ")))
tmp.sort(reverse=True)

print(tmp[2] - tmp[0])

Failing test case input:
-1 -1 200

Expected output:
201


Actual output:
-201


Fixed submission (verdict: Accepted):
tmp = list(map(lambda n : int(n), input().split(" ")))
tmp.sort(reverse=True)
 
print(tmp[0] - tmp[2])

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

ans = 10**5
for i in range(3):
    for j in range(3):
        for k in range(3):
            if i != j and j != k and i != k:
                cost = abs(a[j] - a[i]) + abs(a[k] - a[j])
                print(cost, i, j, k)
                if ans > cost:
                    ans = cost
print(ans)

Failing test case input:
-1 -5 115

Expected output:
120


Actual output:
124 0 1 2
236 0 2 1
120 1 0 2
236 1 2 0
120 2 0 1
124 2 1 0
120


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

ans = 10**5
for i in range(3):
    for j in range(3):
        for k in range(3):
            if i != j and j != k and i != k:
                cost = abs(a[j] - a[i]) + abs(a[k] - a[j])
                if ans > cost:
                    ans = cost
print(ans)

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

ans = min(abs(A-B)+abs(B-C), abs(A-C)+abs(C-B))
print(ans)

Failing test case input:
100 111 010

Expected output:
101


Actual output:
112


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

ans = min(abs(A-B)+abs(B-C), abs(A-C)+abs(C-B), abs(B-A) + abs(A-C))
print(ans)

Problem: p03292
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
task = list(map(int,input().split()))
task.sort(reverse = True)
print(2*task[1]-task[2])

Failing test case input:
14 12 -12

Expected output:
26


Actual output:
36


Fixed submission (verdict: Accepted):
task = list(map(int,input().split()))
task.sort(reverse = True)
print(task[0]-task[2])