You are given matrix A of size n x m and matrix B of size m x p. Compute the matrix product A x B, which has size n x p.
The first line contains three integers n, m and p.
The next n lines describe matrix A, each with m integers.
The following m lines describe matrix B, each with p integers.
Print n lines. Line i contains p integers: row i of the product.
Write your solution, test it against custom input, then submit for a real verdict.
Your submissions, verdicts, drafts and contest score are tied to your account. Registration is free.
1 <= n, m, p <= 100
Each matrix value fits in a 32-bit signed integer. The product fits in a 64-bit signed integer.
2 2 2 1 2 3 4 5 6 7 8
19 22 43 50