chiark
/
gitweb
/
~bjharris
/
aoc-2022.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85499f9
)
20b: working on the example
author
Ben Harris
<bjh21@bjh21.me.uk>
Thu, 30 May 2024 20:24:19 +0000
(21:24 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Thu, 30 May 2024 20:24:19 +0000
(21:24 +0100)
But not the real input
20/20b.bqn
[new file with mode: 0644]
patch
|
blob
diff --git a/20/20b.bqn
b/20/20b.bqn
new file mode 100644
(file)
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