Write a function that, given two square matrices @a@ and @b@, computes their product.
Interface
C++ | typedef vector< vector<int> > Matrix;
Matrix product(const Matrix& a, const Matrix& b); |
MyPy | Matrix: TypeAlias = list[list[int]]
def product(a: Matrix, b: Matrix) -> Matrix |
Precondition @a@ and @b@ are square matrices n× n with n ≥ 0.