You are viewing a single comment's thread. Return to all comments →
import numpy as np a = int(input()) element = [] element1= [] for z in range(a): b= input() c= b.split() element.append(c)
for j in range(a): b= input() c= b.split() element1.append(c) element = np.array(element, dtype=int) element1 = np.array(element1, dtype=int) print(np.dot(element,element1))
Seems like cookies are disabled on this browser, please enable them to open this website
Dot and Cross
You are viewing a single comment's thread. Return to all comments →
import numpy as np a = int(input()) element = [] element1= [] for z in range(a): b= input() c= b.split() element.append(c)
for j in range(a): b= input() c= b.split() element1.append(c) element = np.array(element, dtype=int) element1 = np.array(element1, dtype=int) print(np.dot(element,element1))