2025(03): jolly joltage
This commit is contained in:
@ -34,3 +34,30 @@ You'll need to find the largest possible joltage each bank can produce. In the a
|
||||
The total output joltage is the sum of the maximum joltage from each bank, so in this example, the total output joltage is `98` + `89` + `78` + `92` = _`357`_.
|
||||
|
||||
There are many batteries in front of you. Find the maximum joltage possible from each bank; _what is the total output joltage?_
|
||||
|
||||
### Part Two
|
||||
|
||||
The escalator doesn't move. The Elf explains that it probably needs more joltage to overcome the [static friction](https://en.wikipedia.org/wiki/Static_friction) of the system and hits the big red "joltage limit safety override" button. You lose count of the number of times she needs to confirm "yes, I'm sure" and decorate the lobby a bit while you wait.
|
||||
|
||||
Now, you need to make the largest joltage by turning on _exactly twelve_ batteries within each bank.
|
||||
|
||||
The joltage output for the bank is still the number formed by the digits of the batteries you've turned on; the only difference is that now there will be _`12`_ digits in each bank's joltage output instead of two.
|
||||
|
||||
Consider again the example from before:
|
||||
|
||||
987654321111111
|
||||
811111111111119
|
||||
234234234234278
|
||||
818181911112111
|
||||
|
||||
|
||||
Now, the joltages are much larger:
|
||||
|
||||
* In `987654321111111`, the largest joltage can be found by turning on everything except some `1`s at the end to produce _`987654321111`_.
|
||||
* In the digit sequence `811111111111119`, the largest joltage can be found by turning on everything except some `1`s, producing _`811111111119`_.
|
||||
* In `234234234234278`, the largest joltage can be found by turning on everything except a `2` battery, a `3` battery, and another `2` battery near the start to produce _`434234234278`_.
|
||||
* In `818181911112111`, the joltage _`888911112111`_ is produced by turning on everything except some `1`s near the front.
|
||||
|
||||
The total output joltage is now much larger: `987654321111` + `811111111119` + `434234234278` + `888911112111` = _`3121910778619`_.
|
||||
|
||||
_What is the new total output joltage?_
|
||||
|
||||
Reference in New Issue
Block a user