Sum and Prod

  • + 0 comments

    Enter your code here. Read input from STDIN. Print output to STDOUT

    import numpy as np

    def map_func(y): return map(int, y.split())

    def sum_prod(x): N, M = map_func(x) array = (np.array([list(map_func(input())) for _ in range(N)])) print(np.prod(np.sum(array, axis = 0)))

    sample_input = input() sum_prod(sample_input)