From: Ben Harris Date: Thu, 30 May 2024 20:24:19 +0000 (+0100) Subject: 20b: working on the example X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=e5fc04859b58668c4479875c6fadb904320a2ebd;p=aoc-2022.git 20b: working on the example But not the real input --- diff --git a/20/20b.bqn b/20/20b.bqn new file mode 100644 index 0000000..dbd8ab4 --- /dev/null +++ b/20/20b.bqn @@ -0,0 +1,11 @@ +Prep←•ParseFloat¨ + +Main←{ 𝕊 orig: + Twiddle←{ (1⊸⌽)⌾((1+(¯1+≠𝕩)|𝕨)⊸↑) (⊑𝕩⊐𝕨)⌽𝕩 } + Mix←Twiddle´⟜⌽ + orig ×↩ 811589153 + cur ← orig Mix˜⍟10 orig + +´((≠cur)|(cur⊐0)+⟨1000,2000,3000⟩)⊏cur +} + +•Show Main Prep •file.Lines ⊑•args