grid
순회function countNegatives(grid: number[][]): number {
const rowMax = grid.length
const colMax = grid[0].length
let negatives = 0
for(let row = 0; row < rowMax; row++) {
for(let col = 0; col < colMax; col++) {
if(grid[row][col] >= 0) continue
negatives += colMax - col
break
}
}
return negatives
};