about summary refs log tree commit diff
path: root/day15.ijs
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-12-16 20:38:55 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-12-16 20:38:55 +0100
commit580d09701f0377c4b80e6ea52cf8fa6b647778b1 (patch)
tree2e3ef57dfb00c94d6c9bfbb0b7a64bf73a9f419f /day15.ijs
parent76933fddfe8deb9d18c40ea974bbe71bbc7dd319 (diff)
downloadadventofcode2020-580d09701f0377c4b80e6ea52cf8fa6b647778b1.tar.gz
adventofcode2020-580d09701f0377c4b80e6ea52cf8fa6b647778b1.tar.xz
adventofcode2020-580d09701f0377c4b80e6ea52cf8fa6b647778b1.zip
day15
Diffstat (limited to 'day15.ijs')
-rw-r--r--day15.ijs20
1 files changed, 20 insertions, 0 deletions
diff --git a/day15.ijs b/day15.ijs
new file mode 100644
index 0000000..81aac36
--- /dev/null
+++ b/day15.ijs
@@ -0,0 +1,20 @@
+d =: 5 2 8 16 18 0 1
+
+h =: 3 : 0
+if. 1 = #y do.
+  0
+else.
+  --/ _2 {. y
+end.
+)
+
+part1 =: 3 : 0
+for. i. 2020 do.
+  d =: d,h I. d = {:d
+end.
+2019 { d
+)
+
+part1''  NB. 517
+
+NB. part2 tbd