diff options
Diffstat (limited to 'src/01/part1')
| -rw-r--r-- | src/01/part1 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/01/part1 b/src/01/part1 new file mode 100644 index 0000000..0452569 --- /dev/null +++ b/src/01/part1 @@ -0,0 +1,28 @@ +--- Day 1: Report Repair --- + +After saving Christmas five years in a row, you've decided to take a vacation at a nice resort on a tropical island. Surely, Christmas will go on without you. + +The tropical island has its own currency and is entirely cash-only. The gold coins used there have a little picture of a starfish; the locals just call them [1m[33mstars[0m. None of the currency exchanges seem to have heard of them, but somehow, you'll need to find fifty of these coins by the time you arrive so you can pay the deposit on your room. + +To save your vacation, you need to get all [1m[33mfifty stars[0m by December 25th. + +Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants [1m[33mone star[0m. Good luck! + +Before you leave, the Elves in accounting just need you to fix your [1m[37mexpense report[0m (your puzzle input); apparently, something isn't quite adding up. + +Specifically, they need you to [1m[37mfind the two entries that sum to 2020[0m and then multiply those two numbers together. + +For example, suppose your expense report contained the following: + +1721 +979 +366 +299 +675 +1456 + +In this list, the two entries that sum to 2020 are 1721 and 299. Multiplying them together produces 1721 * 299 = 514579, so the correct answer is [1m[37m514579[0m. + +Of course, your expense report is much larger. [1m[37mFind the two entries that sum to 2020; what do you get if you multiply them together?[0m + + |
