<doocs>1228.Missing Number In Arithmetic Progression_1.py
def missingNumber( arr: List[int]) -> int:
    n = len(arr)
    d = (arr[-1] - arr[0]) // n
    for i in range(1, n):
        if arr[i] != arr[i - 1] + d:
            return arr[i - 1] + d
    return arr[0]
def sample_funcname ( var_0 : List [ int ] ) -> int :
    var_4 = len ( var_0 )
    var_7 = ( var_0 [ - 1 ] - var_0 [ 0 ] ) // var_4
    for var_9 in range ( 1 , var_4 ) :
        if var_0 [ var_9 ] != var_0 [ var_9 - 1 ] + var_7 :
            return var_0 [ var_9 - 1 ] + var_7
    return var_0 [ 0 ]
