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

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = math.gcd(xg,xx[i])
    print(xg)


Fixed submission:
import fractions

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = fractions.gcd(xg,xx[i])
    print(xg)

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

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
    exit()

xg = math.gcd(xx[0],xx[1])

if n == 2:
    print(xg)
    exit()

for i in range(2,n):
    xg = math.gcd(xg,xx[i])

print(xg)


Fixed submission:
import fractions

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = fractions.gcd(xg,xx[i])
    print(xg)

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

n, X = map(int, input().split())
x = list(map(int, input().split()))

if n == 1:
    print(abs(X-x[0]))
    exit()

x.append(X)

x.sort()

xx=[]

for i in range(1,n+1):
    xx.append(x[i]-x[i-1])

xxx = math.gcd(xx[0],xx[1])

if n == 2:
    print(xxx)
    exit()

for i in range(2,n):
    xxx=math.gcd(xxx,xx[i])
print(xxx)

Fixed submission:
import fractions

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = fractions.gcd(xg,xx[i])
    print(xg)

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

n, X = map(int, input().split())
x = list(map(int, input().split()))

if n == 1:
    print(abs(X-x[0]))
    exit()

x.append(X)

x.sort()

xx=[]

for i in range(1,n+1):
    xx.append(x[i]-x[i-1])

xgcd = math.gcd(xx[0],xx[1])

if n == 2:
    print(xgcd)
    exit()

for i in range(2,n):
    xgcd=math.gcd(xgcd,xx[i])
print(xgcd)

Fixed submission:
import fractions

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = fractions.gcd(xg,xx[i])
    print(xg)

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

n, X = map(int, input().split())
x = list(map(int, input().split()))

if n == 1:
    print(abs(X-x[0]))
    exit()

x.append(X)

x.sort()

xx=[]

for i in range(1,n):
    xx.append(x[i]-x[i-1])

xgcd = math.gcd(xx[0],xx[1])

for i in range(2,n-1):
    xgcd=math.gcd(xgcd,xx[i])
print(xgcd)

Fixed submission:
import fractions

n, X = map(int, input().split())
x = list(map(int, input().split()))

xx = []

for i in range(n):
    xx.append(abs(x[i]-X))

if n == 1:
    print(xx[0])
else:
    xg = xx[0]
    for i in range(1,n):
        xg = fractions.gcd(xg,xx[i])
    print(xg)