You are viewing a single comment's thread. Return to all comments →
line=input() n=int(line.split()[0]) m=int(line.split()[1]) a=[] b=[] for i in range(n): m=list(map(int,input().split())) a.append(m)
a=numpy.array(a)
for i in range(n): m=list(map(int,input().split())) b.append(m)
b=numpy.array(b)
print(a+b) print(a-b) print(a*b) print(a//b) print(a%b) print(a**b)
Seems like cookies are disabled on this browser, please enable them to open this website
Array Mathematics
You are viewing a single comment's thread. Return to all comments →
line=input() n=int(line.split()[0]) m=int(line.split()[1]) a=[] b=[] for i in range(n): m=list(map(int,input().split())) a.append(m)
a=numpy.array(a)
for i in range(n): m=list(map(int,input().split())) b.append(m)
b=numpy.array(b)
print(a+b) print(a-b) print(a*b) print(a//b) print(a%b) print(a**b)