<doocs>1572.Matrix Diagonal Sum_1.py
def diagonalSum( mat: List[List[int]]) -> int:
    n = len(mat)
    res = 0
    for i in range(n):
        res += mat[i][i] + (0 if n - i - 1 == i else mat[i][n - i - 1])
    return res
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
    var_4 = len ( var_0 )
    var_6 = 0
    for var_8 in range ( var_4 ) :
        var_6 += var_0 [ var_8 ] [ var_8 ] + ( 0 if var_4 - var_8 - 1 == var_8 else var_0 [ var_8 ] [ var_4 - var_8 - 1 ] )
    return var_6
