In this **HackerRank Sum and Prod problem solution,** You are given a 2-D array with dimensions NXM. Your task is to perform the sum tool over axis 0 and then find the product of that result.

## HackerRank Sum and Prod in python problem solution

import numpy A = [] for i in range(int(raw_input().split(' ')[0])): A.append([int(x) for x in raw_input().split(' ')]) A = numpy.array(A) sum_prod = numpy.sum(A, axis=0) sum_prod = numpy.prod(sum_prod) print sum_prod

## 0 Comments