Problem:
 Score : 300 points    Problem Statement There are N cities on a number line. The i -th city is located at coordinate x_i .  Your objective is to visit all these cities at least once.  In order to do so, you will first set a positive integer D .  Then, you will depart from coordinate X and perform Move 1 and Move 2 below, as many times as you like:   Move 1 : travel from coordinate y to coordinate y + D .  Move 2 : travel from coordinate y to coordinate y - D .   Find the maximum value of D that enables you to visit all the cities.  Here, to visit a city is to travel to the coordinate where that city is located.      Constraints  All values in input are integers.  1 \leq N \leq 10^5  1 \leq X \leq 10^9  1 \leq x_i \leq 10^9  x_i are all different.  x_1, x_2, ..., x_N \neq X         Input Input is given from Standard Input in the following format:  N  X  x_1  x_2  ...  x_N       Output Print the maximum value of D that enables you to visit all the cities.        Sample Input 1 3 3
1 7 11      Sample Output 1 2  Setting D = 2 enables you to visit all the cities as follows, and this is the maximum value of such D .   Perform Move 2 to travel to coordinate 1 .  Perform Move 1 to travel to coordinate 3 .  Perform Move 1 to travel to coordinate 5 .  Perform Move 1 to travel to coordinate 7 .  Perform Move 1 to travel to coordinate 9 .  Perform Move 1 to travel to coordinate 11 .        Sample Input 2 3 81
33 105 57      Sample Output 2 24       Sample Input 3 1 1
1000000000      Sample Output 3 999999999

Solution (Python):
import subprocess
import gzip, base64, os
import stat

gz = b'H4sIAJruY10C/+19e3xTRfb4TfoKr6YgYnkIQaO2AqWhpbSI2FICN5BClxZEFC9pmtBomnSTm1JcFbSta4xVdtd1/e53H6y76/rzt7u6rusiq1AEWsQXPkAegq7PxIrWF1RR8jtnZm5y701uhXW/38/vjw00c8+5Z2bOOXPmzJm5k7kbrPYFep2Okz56bi6HkOP8SgJXMvzmYIIEcOXcEPiexE3gsgHOktFVcpWKdIAVLaUGRpcBf5nwV66ncLm+UpFOYHRSqpOlWZz8U6lI+bWcIuU4UyIf8nqwmWIPNq9RpAWZFF+bo8ynZ/kGWL4BRi+lnJ5TpJJ8meyvnuHrmVxSOp/RzZfRk/rfFRvxOt9B4XxHpSLtYHQdqnzfg3zZ3Jl/8li6jNWnqRfGv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jiUF2O/b3M0eFot2HWDHuyYkB0dJ8jq9oPOIUfVPJtgKSpRdSUM49N6EfRuoHtBJoO6kKR8WqVgP9IqQWgB0SGMF653rWeeL62fSu3noHJnc0saByG5fn8wbePOdHpdDpjCiBD92EB++BOhVlXXd/ndanNCUUg7KSUgkQLpg2cxQJNZlEogN/kVb4oJKUd+sEWNglPdwlkPg2wwQOUT1SyFgazZ3+hKE07MkocTxExatRwJmGOd4GpuEdeD52sBIfwBx1qXNZ2lNIBn9MFYIjqbUgzNQ1yhqw14drLwxLMsTXziItvvIExpaxNaXIGgH9yXB+puLU613bMcoEA/36obGJ3TKIJpNsXbLvetQ4+8zBUMNWNR1dWAL6bMlZGTA1xpRjhogFnMZ6QJ4kpaQqLVmYYJMPgaAYz/enCbMPdJ059a1ifNz1KqjGxTwwQMZDjqXP8f62eMkYCcAAA='
bin = gzip.decompress(base64.b64decode(gz))
pymain = os.path.join(os.path.dirname(__file__), 'pymain')
with open(pymain, 'wb') as f:
    f.write(bin)
os.chmod(pymain, stat.S_IXUSR | stat.S_IXGRP)
cmd = pymain
subprocess.call(cmd.split())

Solution (Python):
import fractions


def func():
    N, init = map(int, input().split())
    x = list(map(int, input().split()))

    x.append(init)
    x.sort()

    ans = x[1] - x[0]
    for i in range(N):
        ans = fractions.gcd(ans, x[i+1] - x[i])

    print(ans)


if __name__ == '__main__':
    func()

Solution (Python):
import fractions

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

y = [0] * N
for i in range(N):
    y[i] = abs(X-x[i])

ans = y[0]
for i in range(1,N):
    ans = fractions.gcd(ans,y[i])
print(ans)

Solution (Python):
from fractions import gcd


N, X = map(int, input().split())
xs = sorted(map(int, input().split()))
diffs = []
for i in range(N):
    diffs.append(abs(xs[i] - X))

gcds = [0]
for i in range(N):
    gcds.append(gcd(gcds[i], diffs[i]))
print(gcds[-1])

Solution (Python):
from fractions import gcd
from functools import reduce
X=int(input().split()[1])
print(reduce(gcd,map(lambda x:abs(int(x)-X),input().split())))