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

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

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

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    print(ans)
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

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

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    print(ans)
    ans = math.gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)


Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X - int(list[i])) for i in range(N)]
print(int(gcd(ans_list)))

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X- int(list[i])) for i in range(N)]
print(gcd(ans_list))

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)