We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac318e5 commit 0f85284Copy full SHA for 0f85284
LiiNi-coder/202510/29 PGM 행렬의 곱셈.md
@@ -0,0 +1,24 @@
1
+```java
2
+import java.util.*;
3
+
4
+class Solution {
5
+ public int[][] solution(int[][] arr1, int[][] arr2) {
6
+ int rows = arr1.length;
7
+ int cols = arr2[0].length;
8
+ int common = arr2.length;
9
+ int[][] answer = new int[rows][cols];
10
11
+ for(int i = 0; i < rows; i++){
12
+ for(int j = 0; j < cols; j++){
13
+ int sum = 0;
14
+ for(int k = 0; k < common; k++){
15
+ sum += arr1[i][k] * arr2[k][j];
16
+ }
17
+ answer[i][j] = sum;
18
19
20
21
+ return answer;
22
23
+}
24
+```
0 commit comments