You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
412 B
Plaintext

$ 0 3 6 9 12 15
$ 1 3 6 10 15 21
$ 10 13 16 21 30 45
TestInput ←
Parse ← ⊜(⊜⋕≠@ .)≠@\n.
Differences ← ⍢(⊂:□≡/-◫2°□⊢⇌.)(¬≍⊚⧻.°□⊢⇌)¤□
NextElement ← /+≡(⊢⇌)Differences
PrevElement ← /-⇌≡⊢Differences
/+≡NextElement Parse TestInput
/+≡PrevElement Parse TestInput
/+≡NextElement Parse &fras "day09.in"
/+≡PrevElement Parse &fras "day09.in"