* Given a square matrix mat, return the sum of the matrix diagonals. * Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are not part ...
int primaryDiagonal = mat[rowNo][rowNo]; //pattern for primary diagonal elements int secondaryDiagonal = mat[rowNo][cols - 1 - rowNo]; //pattern for secondary diagonal elements ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する