HackerRank- Python Array Mathematics


Perform the Mathematical operations.

  1. import numpy as np
  2. n, m = map(int, input().split())
  3. a, b = (np.array([input().split() for _ in range(n)], dtype=int) for _ in range(2))
  4. print(a+b, a-b, a*b, a//b, a%b, a**b, sep='\n')

download android app