298. Multiply Two Matrices
MediumMatrix
Multiply an r×k matrix A by a k×c matrix B and print the r×c product.
Input format
Line 1: r k c Next r lines: A Next k lines: B
Output format
r lines of c integers.
Example 1
Input
2 3 2 1 2 3 4 5 6 7 8 9 10 11 12
Output
58 64 139 154
Example 2
Input
1 1 1 3 4
Output
12
Constraints
1 ≤ r, k, c ≤ 100
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…