Buggy python submission (verdict: Runtime Error):
task =  [int (i) for i in input.split(" ")]
ans=5000
if abs(task[0]-task[1])+abs(task[2]-task[0]) < ans:
	ans = abs(task[0]-task[1])+abs(task[2]-task[0])
if abs(task[0]-task[2])+abs(task[1]-task[0]) < ans:
	ans = abs(task[0]-task[2])+abs(task[1]-task[0])
if abs(task[1]-task[0])+abs(task[2]-task[1]) < ans:
	ans = abs(task[1]-task[0])+abs(task[2]-task[1])
if abs(task[1]-task[2])+abs(task[0]-task[1]) < ans:
	ans = abs(task[1]-task[2])+abs(task[0]-task[1])
if abs(task[2]-task[0])+abs(task[1]-task[2]) < ans:
	ans = abs(task[2]-task[0])+abs(task[1]-task[2])
if abs(task[2]-task[1])+abs(task[0]-task[2]) < ans:
	ans = abs(task[2]-task[1])+abs(task[0]-task[2])
print(ans)

Fixed submission:
task = input().split(" ")
ans = 5000
if abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ])) < ans : 
	ans = abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ]))
if abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ])) < ans : 
	ans = abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ]))
if abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ])) < ans : 
	ans = abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ]))
if abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ])) < ans : 
	ans = abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ]))
if abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ])) < ans : 
	ans = abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ]))
if abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ])) < ans : 
	ans = abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ]))
print ( ans )

Buggy python submission (verdict: Runtime Error):
Source code
Copy
task =  [int (i) for i in input.split(" ")]
ans=5000
if abs(task[0]-task[1])+abs(task[2]-task[0]) < ans:
	ans = abs(task[0]-task[1])+abs(task[2]-task[0])
if abs(task[0]-task[2])+abs(task[1]-task[0]) < ans:
	ans = abs(task[0]-task[2])+abs(task[1]-task[0])
if abs(task[1]-task[0])+abs(task[2]-task[1]) < ans:
	ans = abs(task[1]-task[0])+abs(task[2]-task[1])
if abs(task[1]-task[2])+abs(task[0]-task[1]) < ans:
	ans = abs(task[1]-task[2])+abs(task[0]-task[1])
if abs(task[2]-task[0])+abs(task[1]-task[2]) < ans:
	ans = abs(task[2]-task[0])+abs(task[1]-task[2])
if abs(task[2]-task[1])+abs(task[0]-task[2]) < ans:
	ans = abs(task[2]-task[1])+abs(task[0]-task[2])
print(ans)

Fixed submission:
task = input().split(" ")
ans = 5000
if abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ])) < ans : 
	ans = abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ]))
if abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ])) < ans : 
	ans = abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ]))
if abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ])) < ans : 
	ans = abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ]))
if abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ])) < ans : 
	ans = abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ]))
if abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ])) < ans : 
	ans = abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ]))
if abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ])) < ans : 
	ans = abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ]))
print ( ans )

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
a = list(map(int, input().split()))

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    a_0 = numbers.pop()
    for i in numbers:
        a_0 = lcm_base(a_0, i)
    return a_0

b = a.copy()
m = lcm_list(b)-1
sum = 0
for j in a:
    sum += m%j

print(sum)

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