2025(06): pull in part 1

This commit is contained in:
2025-12-06 17:32:58 +01:00
parent 6d1d241bce
commit 819c9bff73
3 changed files with 47 additions and 0 deletions

38
2025/06/README.md Normal file
View File

@ -0,0 +1,38 @@
# Day 6: Trash Compactor
[https://adventofcode.com/2025/day/6](https://adventofcode.com/2025/day/6)
## Description
### Part One
After helping the Elves in the kitchen, you were taking a break and helping them re-enact a movie scene when you over-enthusiastically jumped into the garbage chute!
A brief fall later, you find yourself in a <span title="To your surprise, the smell isn't that bad.">garbage smasher</span>. Unfortunately, the door's been magnetically sealed.
As you try to find a way out, you are approached by a family of cephalopods! They're pretty sure they can get the door open, but it will take some time. While you wait, they're curious if you can help the youngest cephalopod with her [math homework](https://adventofcode.com/2021/day/18).
Cephalopod math doesn't look that different from normal math. The math worksheet (your puzzle input) consists of a list of _problems_; each problem has a group of numbers that need to be either _added_ (`+`) or _multiplied_ (`*`) together.
However, the problems are arranged a little strangely; they seem to be presented next to each other in a very long horizontal list. For example:
123 328 51 64
45 64 387 23
6 98 215 314
* + * +
Each problem's numbers are arranged vertically; at the bottom of the problem is the symbol for the operation that needs to be performed. Problems are separated by a full column of only spaces. The left/right alignment of numbers within each problem can be ignored.
So, this worksheet contains four problems:
* `123` \* `45` \* `6` = _`33210`_
* `328` + `64` + `98` = _`490`_
* `51` \* `387` \* `215` = _`4243455`_
* `64` + `23` + `314` = _`401`_
To check their work, cephalopod students are given the _grand total_ of adding together all of the answers to the individual problems. In this worksheet, the grand total is `33210` + `490` + `4243455` + `401` = _`4277556`_.
Of course, the actual worksheet is _much_ wider. You'll need to make sure to unroll it completely so that you can read the problems clearly.
Solve the problems on the math worksheet. _What is the grand total found by adding together all of the answers to the individual problems?_