aboutsummaryrefslogtreecommitdiffstats
path: root/src/09/part2
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-04-08 12:40:30 -0400
committerLouis Burda <quent.burda@gmail.com>2023-04-09 10:21:36 -0400
commit9282e95e8844afe856ba76ceb6d2c3010df8bb1a (patch)
treee35affc89b20324371381e079f7cb5f8a06aa81b /src/09/part2
parent2b5d4232879dc74491dabf54a0ddc958d66ebcec (diff)
downloadaoc2020-zig-master.tar.gz
aoc2020-zig-master.zip
Restructure repo and update solutions to zig 0.10.1HEADmaster
Diffstat (limited to 'src/09/part2')
-rw-r--r--src/09/part221
1 files changed, 21 insertions, 0 deletions
diff --git a/src/09/part2 b/src/09/part2
new file mode 100644
index 0000000..674e22d
--- /dev/null
+++ b/src/09/part2
@@ -0,0 +1,21 @@
+--- Part Two ---
+
+The final step in breaking the XMAS encryption relies on the invalid number you just found: you must
+find a contiguous set of at least two numbers in your list which sum to the invalid
+number from step 1.
+
+Again consider the above example:
+
+35 20 15 25 47 40 62 55 65 95 102 117 150 182
+127 219 299 277 309 576
+
+In this list, adding up all of the numbers from 15 through 40 produces the invalid number from step
+1, 127. (Of course, the contiguous set of numbers in your actual list might be much longer.)
+
+To find the encryption weakness, add together the smallest and
+largest number in this contiguous range; in this example, these are 15 and 47,
+producing 62.
+
+What is the encryption weakness in your XMAS-encrypted list of numbers?
+
+