题解 | #矩阵乘法#

矩阵乘法

https://www.nowcoder.com/practice/ebe941260f8c4210aa8c17e99cbc663b

= int(input())

= int(input())

= int(input())

A,= [],[]

for i in range(x):

    A.append(list(map(int,input().split())))

for i in range(y):

    B.append(list(map(int,input().split())))

= []

for i in range(x):

    l = []

    for j in range(z):

        c = 0

        for k in range(y):

            c += A[i][k]*B[k][j]

        l.append(c)

    C.append(l)

for i in C:

    print(*i)

全部评论

相关推荐

不愿透露姓名的神秘牛友
10-09 16:39
已编辑
英俊的靓仔offer...:我感觉吧第二个寻迹小车的项目有点配不上你的学历了,写上去扣分了都可能对你来说,好歹是211硕士嘛,写在我这种二本混子的简历上还说得过去,个人观点哦,能再有个好点的项目应该会好很多,或者干脆不写第二个换个啥实习经历?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务