Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        distance.append(cd)
        del distance[0]
        del distance[0]

print(distance[0])


Fixed submission:
from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)

Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        del distance[0]
        del distance[0]
        distance.append(cd)

print(distance[0])


Fixed submission:
from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)

Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while True:
    if len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        del distance[0]
        del distance[0]
        distance.append(cd)
        if len(distance) == 1:
            print(distance[0])
            exit()
    else:
        print(distance[0])
        break


Fixed submission:
from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)

Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while True:
    if len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        del distance[0]
        del distance[0]
        distance.append(cd)
        if len(distance) == 1:
            print(distance[0])
            exit()
    else:
        print(distance[0])
        exit()


Fixed submission:
from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)

Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while True:
    if len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        del distance[0]
        del distance[0]
        distance.append(cd)
        if len(distance) == 1:
            print(distance[0])
            exit()
    else:
        print(distance[0])


Fixed submission:
from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)