1 2
/ a better approach is to use the downgraded list for both tasks, as demonstrated by leah2 (|/e),+/e@3#>e:(+/.'1_)'(&0=#'i)_i:0:"input"