about summary refs log tree commit diff
path: root/day18
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-12-20 00:28:36 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-12-20 00:28:36 +0100
commit868e907bdec033e993e02a6208d6ec6c96402e4f (patch)
treea07d6e5443f491821e8affaea6116449d81b3a33 /day18
parent301c154d3eaa03a673f0ced1c94a623fe9d6e39e (diff)
downloadadventofcode2017-868e907bdec033e993e02a6208d6ec6c96402e4f.tar.gz
adventofcode2017-868e907bdec033e993e02a6208d6ec6c96402e4f.tar.xz
adventofcode2017-868e907bdec033e993e02a6208d6ec6c96402e4f.zip
day18
Diffstat (limited to 'day18')
-rw-r--r--day1841
1 files changed, 41 insertions, 0 deletions
diff --git a/day18 b/day18
new file mode 100644
index 0000000..dd5f7cc
--- /dev/null
+++ b/day18
@@ -0,0 +1,41 @@
+set i 31
+set a 1
+mul p 17
+jgz p p
+mul a 2
+add i -1
+jgz i -2
+add a -1
+set i 127
+set p 618
+mul p 8505
+mod p a
+mul p 129749
+add p 12345
+mod p a
+set b p
+mod b 10000
+snd b
+add i -1
+jgz i -9
+jgz a 3
+rcv b
+jgz b -1
+set f 0
+set i 126
+rcv a
+rcv b
+set p a
+mul p -1
+add p b
+jgz p 4
+snd a
+set a b
+jgz 1 3
+snd b
+set f 1
+add i -1
+jgz i -11
+snd a
+jgz f -16
+jgz a -19