We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Sum and Prod
- Discussions
Sum and Prod
Sum and Prod
Sort by
recency
|
364 Discussions
|
Please Login in order to post a comment
import numpy as np
n , m = map(int,input().split(' '))
arr = np.array([list(map(int,input().split(' '))) for _ in range(n)])
sum = np.sum(arr, axis = 0) print(np.prod(sum))
import numpy as np
n , m = map(int,input().split(' '))
arr = np.array([list(map(int,input().split(' '))) for _ in range(n)])
print(np.prod(np.sum(arr,axis=0)))
For Python3 Platform