You are viewing a single comment's thread. Return to all comments →
import numpy as np N = int(input()) A = [list(map(int,input().split())) for _ in range(N)] B = [list(map(int,input().split())) for _ in range(N)] all_ind_sum = [[] for _ in range(N)] for i in range(N): for j in range(N): ind_sum = 0 for k in range(N): ind_sum += A[i][k] * B[k][j] all_ind_sum[i].append(ind_sum) print(np.array(all_ind_sum))
Seems like cookies are disabled on this browser, please enable them to open this website
Dot and Cross
You are viewing a single comment's thread. Return to all comments →