comefrom: <doocs>1572.Matrix Diagonal Sum_1.py
code: 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
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
      var_1 = len ( var_0 )
      var_2 = 0
      for var_3 in range ( var_1 ) :
          var_2 += var_0 [ var_3 ] [ var_3 ] + ( 0 if var_1 - var_3 - 1 == var_3 else var_0 [ var_3 ] [ var_1 - var_3 - 1 ] )
      return var_2
  