题解 | #计算两个矩阵的乘积#
计算两个矩阵的乘积
https://www.nowcoder.com/practice/ed6552d03e624ba58d16af6d57e1c3e9
while True: try: list2=[] list3=[] for i in range(2): list1=list(map(int,input().strip().split())) list2.append(list1) for i in range(3): list1=list(map(int,input().strip().split())) list3.append(list1) list4=[[0,0],[0,0]] for i in range(2): for j in range(2): for k in range(3): list4[i][j]+=list2[i][k]*list3[k][j] for i in range(2): for j in range(2): print(list4[i][j],end=' ') print() except EOFError: break