Sum and Prod

  • + 0 comments

    My compact solution…

    import sys
    import numpy as np
    
    print(np.loadtxt(sys.stdin.readlines()[1:], int).sum(axis=0).prod())
    

    If the import lines didn't count, this could be considered a one-liner.