diff --git a/users/sterni/exercises/aoc/2022/01/1.bqn b/users/sterni/exercises/aoc/2022/01/1.bqn index f95851e0d..440efff41 100644 --- a/users/sterni/exercises/aoc/2022/01/1.bqn +++ b/users/sterni/exercises/aoc/2022/01/1.bqn @@ -1,7 +1,7 @@ lib ← •Import •path∾"/../../lib.bqn" input ← lib.ReadDec¨¨ (<"") lib.SplitOn •FLines •path∾"/input" -cpe ← +´¨ input +a‿·‿b ← +`3↑∨+´¨ input -•Out "day 01.1: "∾•Fmt ⌈´cpe -•Out "day 01.2: "∾•Fmt +´3↑∨cpe +•Out "day 01.1: "∾•Fmt a +•Out "day 01.2: "∾•Fmt b diff --git a/users/sterni/exercises/aoc/2022/01/1.k b/users/sterni/exercises/aoc/2022/01/1.k index 295503905..42d64dfb6 100644 --- a/users/sterni/exercises/aoc/2022/01/1.k +++ b/users/sterni/exercises/aoc/2022/01/1.k @@ -1,2 +1 @@ - / 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" +(+\e@3#>e:(+/.'1_)'(&0=#'i)_i:0:"input")_1