293. 행렬의 덧셈

김해준's avatar
Jan 20, 2026
293. 행렬의 덧셈

사용언어 : C#

문제
notion image
풀이
public class Solution { public int[,] solution(int[,] arr1, int[,] arr2) { int val1 = arr1.GetLength(0); int val2 = arr2.GetLength(1); int[,] answer = new int[val1,val2]; for(int i = 0 ; i < val1;i++) { for(int j = 0 ; j < val2;j++) { answer[i,j] =arr1[i,j] + arr2[i,j]; } } return answer; } }
notion image
Share article