variable to store the largest K that makes A palindromic
K = abs ( A [ 0 ] - A [ N - 1 ] ) NEW_LINE for i in range ( 1 , N // 2 ) : NEW_LINE INDENT K = gcd ( K , abs ( A [ i ] - A [ N - i - 1 ] ) ) NEW_LINE DEDENT