#Z15207. 矩阵乘法
矩阵乘法
Description
Compute the matrix multiplication of two matrices.
When an n×m matrix A is multiplied by an m×k matrix B, the resulting matrix C is of size n×k,
where C[i][j] = A[i][0]×B[0][j] + A[i][1]×B[1][j] + …… +A[i][m-1]×B[m-1][j]
(Here, C[i][j] denotes the element in the i-th row and j-th column of matrix C).
Input Format
The first line contains n, m, k, indicating that matrix A has n rows and m columns, and matrix B has m rows and k columns. Here, n, m, k are all less than 100.
Next, input the two matrices A and B sequentially: matrix A has n rows and m columns, and matrix B has m rows and k columns. The absolute value of each element in the matrices will not exceed 1000.
Output Format
Output matrix C, consisting of n rows, each containing k integers separated by a single space.
3 2 3
1 1
1 1
1 1
1 1 1
1 1 1
2 2 2
2 2 2
2 2 2