题解 | #牛牛的矩阵相加#
牛牛的矩阵相加
https://www.nowcoder.com/practice/730b90507602412fac90a3f106bfa0cd
'''my_list=[[1,2,3],[4,5,6],[7,8,9]] x=int(input()) a,b,c=[],[],[] for i in my_list: for j in i: m=j*x i[i.index(j)]=m print(my_list)''' my_list=[[1,2,3],[4,5,6],[7,8,9]] x=int(input()) for i in range(len(my_list)): for j in range(len(my_list[i])): my_list[i][j]*=x print(my_list)