summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBrian Chu <brianmchu42@gmail.com>2022-01-09 17:24:34 -0800
committerBrian Chu <brianmchu42@gmail.com>2022-01-09 17:24:34 -0800
commitb45f31b01c165c64d9c821fc36244da5d950962e (patch)
treeb71b6caec2f88cc5049bdcfc88cf9000c297836a
parentdffde08c3fc0da933d597ccc907aa2e1186222db (diff)
downloadAdventOfCode2016-b45f31b01c165c64d9c821fc36244da5d950962e.tar.gz
solution for day 25 main
-rw-r--r--day25.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/day25.md b/day25.md
new file mode 100644
index 0000000..7ff839c
--- /dev/null
+++ b/day25.md
@@ -0,0 +1,17 @@
+Based on decompiling the code we realize that the program essentially accomplishes this:
+
+```
+d = a + 2548
+while true {
+  a = d
+  while a != 0 {
+    b = a % 2
+    a /= 2
+    output b
+  }
+}
+```
+
+which basically takes the value of d and prints out the reverse binary representation over and over
+
+the lowest such number above 2548 is 2730, which in binary is 101010101010 so we initialize a to value 2730 - 2548 = 182
\ No newline at end of file