Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Created December 4, 2025 15:37
Show Gist options
  • Select an option

  • Save ab5tract/df689ab100910851a3903a28b9e06215 to your computer and use it in GitHub Desktop.

Select an option

Save ab5tract/df689ab100910851a3903a28b9e06215 to your computer and use it in GitHub Desktop.
--- Part Two ---
The escalator doesn't move. The Elf explains that it probably needs more joltage to overcome the 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 1s at the end to produce 987654321111.
In the digit sequence 811111111111119, the largest joltage can be found by turning on everything except some 1s, 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 1s near the front.
The total output joltage is now much larger: 987654321111 + 811111111119 + 434234234278 + 888911112111 = 3121910778619.
What is the new total output joltage?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment