Dot and Cross

  • + 0 comments

    import numpy

    N = int(input())

    ListA = list() ListB = list()

    for i in range(N): ListA.append(list(map(int , input().split())))

    for j in range(N): ListB.append(list(map(int , input().split())))

    A = numpy.array(ListA) B = numpy.array(ListB)

    result = numpy.dot(A , B)

    print(result)