Sum and Prod

  • + 0 comments

    import numpy as np

    n, m = list(map(int, input().strip().split()))

    arr = np.array([input().strip().split() for _ in range(n)], dtype=np.int32) print(np.prod(np.sum(arr, axis=0)))