Hi, There!
안녕하세요, 바오밥입니다.
목차
- 문제
- 풀이
문제
문제 내용
https://school.programmers.co.kr/learn/courses/30/lessons/12950
풀이
나의 풀이
class Solution {
public int[][] solution(int[][] arr1, int[][] arr2) {
int row = arr1.length;
int col = arr1[0].length;
int[][] answer = new int[row][col];
for(int i=0; i<row; i++)
for(int j=0; j<col; j++)
answer[i][j] = arr1[i][j] + arr2[i][j];
return answer;
}
}
'Dev > PS' 카테고리의 다른 글
[프로그래머스-연습문제] 최대공약수와 최소공배수 (0) | 2023.08.17 |
---|---|
[프로그래머스-연습문제] 직사각형 별찍기 (0) | 2023.08.17 |
[프로그래머스-연습문제] 문자열 다루기 기본 (0) | 2023.08.17 |
[프로그래머스-연습문제] 부족한 금액 계산하기 (0) | 2023.08.17 |
[프로그래머스-연습문제] 문자열 내림차순으로 배치하기 (0) | 2023.08.17 |