Sum and Prod
-
Practice>Python>Numpy>Sum and Prodhackerrank.com 2019. 3. 12. 18:57
hackerrank.comSum and ProdProblem link : https://www.hackerrank.com/challenges/np-sum-and-prod/problemDifficulty : Easy TipPlease understand how to use numpy.sum() and numpy.prod()They are all you should know Solution import numpy as np N, M = list(map(int, input().split(' '))) arrA = np.array([input().split(' ') for _ in range(N)], int) arrB = np.sum(arrA, axis=0) #print(arrB) print(np.prod(arr..