In this HackerRank Dot and Cross problem solution You are given two arrays A and B. Both have dimensions of NXN. Your task is to compute their matrix product.

HackerRank Dot and Cross in python problem solution

HackerRank Dot and Cross in python problem solution

import numpy

n = input()
a = [map(int, raw_input().split()) for _ in xrange(n)]
b = [map(int, raw_input().split()) for _ in xrange(n)]

print numpy.dot(a, b)