def solution(arr1, arr2):
n, m, r = len(arr1), len(arr1[0]), len(arr2[0])
answer = [[0] * r for _ in range(n)]
for i in range(n):
for j in range(m):
for k in range(r):
answer[i][k] += arr1[i][j] * arr2[j][k]
return answer
행렬의 곱셈 식을 이용하여 문제를 해결할 수 있다.
answer[i][k] += arr1[i][j] * arr2[j][k]