프로그래머스LV1 - 행렬의 덧셈

Kong-al·2022년 10월 14일
0

22.10.14 D-79

프로그래머스LV1 - 행렬의 덧셈

[ 답안 ]

class Solution {
    public int[][] solution(int[][] arr1, int[][] arr2) {
        
        for(int i = 0; i < arr1.length; i++){
            for(int j = 0; j <arr1[0].length; j++){
              arr1[i][j] += arr2[i][j];  
            }
        }
        return arr1;
    }
}
profile
웹개발 공부중!(❁´◡`❁)

0개의 댓글