Sum and Prod

  • + 0 comments

    import numpy N, M = list(map(int, input().split())) my_array = numpy.array([input().strip().split()[:M] for _ in range(N)], dtype=numpy.int32) print(numpy.prod(numpy.sum(my_array, axis=0)))