Function to find the gcd of a path
def find_gcd ( arr ) : NEW_LINE INDENT if ( len ( arr ) == 1 ) : NEW_LINE INDENT return arr [ 0 ] NEW_LINE DEDENT g = arr [ 0 ] NEW_LINE for i in range ( 1 , len ( arr ) ) : NEW_LINE INDENT g = gcd ( g , arr [ i ] ) NEW_LINE DEDENT return g NEW_LINE DEDENT