You are viewing a single comment's thread. Return to all comments →
import numpy as np
n = int(input().split()[0])
a, b = [np.array([input().split() for _ in range(n)], int) for _ in range(2)]
print(np.add(a, b), np.subtract(a, b), np.multiply(a, b), np.floor_divide(a, b), np.mod(a, b), np.power(a, b), sep='\n')
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 →
import numpy as np
n = int(input().split()[0])
a, b = [np.array([input().split() for _ in range(n)], int) for _ in range(2)]
print(np.add(a, b), np.subtract(a, b), np.multiply(a, b), np.floor_divide(a, b), np.mod(a, b), np.power(a, b), sep='\n')