浏览代码

Description

Piotr Czajkowski 1 天之前
父节点
当前提交
f16f5a245a
共有 1 个文件被更改,包括 62 次插入 和 0 次删除
  1. 62 0
      01/description.txt

+ 62 - 0
01/description.txt

@@ -0,0 +1,62 @@
+--- Day 1: Dusty Shed ---
+
+"So, you know how we've been having such bad weather?" The Elf's hat is almost blown off her head as she leads you further into the outskirts of the North Pole complex. "The planes haven't been able to fly for a while, which means we're getting quite low on supplies. If we don't get new parts soon, we won't have time to make all the presents for Christmas!"
+
+She leads you around a corner and toward a building you've never been inside. "Of course, we haven't always used planes." You almost trip over a long piece of metal as she slowly pushes open a rusty door on the side of the building. It takes your vision a few moments to adjust to the darkness; at first, all you can make out is dust and cobwebs.
+
+"That brings us to our backup plan." You finally manage to resolve the large machine in the middle of the room: it's a giant Christmas train! Elves are hurriedly cleaning, organizing, loading, and otherwise preparing the train for immediate departure.
+
+The Elf carefully leads you through the chaos. "There's an old rail network that reaches enough of the important facilities near here to get us what we need, if you're quick." Clearly, the Elves have already decided that you will be going on this mission.
+
+To save Christmas, the Elves need you to return with the supplies they need by December 12th.
+
+Collect stars by solving puzzles. Two puzzles will be made available on each day; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!
+
+There are only six more types of things that the Elves need to find and load on the train before it can depart. All of the crates, tanks, boxes, and bins are labeled with the ID number of the type of thing they contain; the Elves have even found a list of each container's ID number (your puzzle input) for you to reference.
+
+Unfortunately, although there was clearly a careful inventory management system at work here once, those records seem to have been lost, and so nobody remembers what each ID actually means.
+
+You approach a group of Elves searching for the contraptions, gizmos, and apparatuses. They have had no luck searching through the hundreds of crates, but one of the Elves seems to recall that they used to have a lot of apparatuses and gizmos and contraptions.
+
+Maybe there's a faster way to find what they're looking for: identify the three most common IDs in the list. For example:
+
+57
+57
+55
+57
+76
+78
+57
+45
+43
+78
+43
+76
+43
+78
+57
+45
+57
+76
+43
+43
+76
+In this list, the three most common IDs are 76, 57, and 43. Surely, these are the IDs for the gizmos, contraptions, and apparatuses! (Multiplying these IDs together gives 186276.)
+
+Analyze your list of IDs. What do you get if you multiply together the three IDs which appear most often?
+
+Your puzzle answer was 108962172.
+
+--- Part Two ---
+
+That worked perfectly! The Elves quickly locate all the contraptions, apparatuses, and gizmos they need.
+
+While they're loaded onto the train, you go to help the Elves looking for the remaining three types of things they need: thingamabobs, thingamajigs, and screws. One of the Elves vaguely recalls her grandfather complaining about how he had to walk all the way across the shed every time he needed a thingamajig, thingamabob, or a screw, since there were always so few containers of each.
+
+This time, you'll need to identify the three least common IDs in the list. In the example list above, the three least common IDs are 45, 78, and 55; these multiply together to produce 193050.
+
+Analyze your list of IDs again. What do you get if you multiply together the three IDs which appear least often?
+
+Your puzzle answer was 7919340.
+
+Both parts of this puzzle are complete! They provide two gold stars: **