Sum and Prod

  • [deleted]Challenge Author
    + 0 comments

    For Python3

    import numpy
    
    n, m = map(int, input().split())
    lst = []
    
    for i in range(n):
        lst.append([*map(int, input().split())])
    
    arr = numpy.array(lst)
    
    print(numpy.prod(numpy.sum(arr, axis=0)))