HackerRank- Python Dot and Cross



Compute matrix product of two arrays



  1. import numpy as np
  2. n = int(input())
  3. a = np.array([input().split() for _ in range(n)], int)
  4. b = np.array([input().split() for _ in range(n)], int)
  5. print(np.dot(a, b))

download android app