day 4 part 2 (before cleaning code)

This commit is contained in:
2021-12-17 16:19:57 +01:00
parent 33ae1b1751
commit d0c6c6e4f7
3 changed files with 319 additions and 107 deletions

View File

@@ -52,8 +52,6 @@ This polymer grows quickly. After step 5, it has length 97; After step 10, it ha
Apply 10 steps of pair insertion to the polymer template and find the most and least common elements in the result. What do you get if you take the quantity of the most common element and subtract the quantity of the least common element?
Your puzzle answer was 2712.
The first half of this puzzle is complete! It provides one gold star: *
--- Part Two ---
The resulting polymer isn't nearly strong enough to reinforce the submarine. You'll need to run more steps of the pair insertion process; a total of 40 steps should do it.
@@ -61,3 +59,7 @@ The resulting polymer isn't nearly strong enough to reinforce the submarine. You
In the above example, the most common element is B (occurring 2192039569602 times) and the least common element is H (occurring 3849876073 times); subtracting these produces 2188189693529.
Apply 40 steps of pair insertion to the polymer template and find the most and least common elements in the result. What do you get if you take the quantity of the most common element and subtract the quantity of the least common element?
Your puzzle answer was 8336623059567.
Both parts of this puzzle are complete! They provide two gold stars: **