Programming, Topic: State Space

Recent posts

AoC 2026 Day 5: Filling space with MATH

AoC 2026 Day 5: Filling space with MATH

Source: Day 5: Rhythmic Factory

Full solution for today (spoilers!).

Part 1

You are given a calculator with a custom set of buttons. What is the sum of all values that can be reached from 0 in up to 3 button presses?

  • [A] appends the digit A
  • [*A] multiplies by A
  • [/A] divides by A (integer division)
  • [A->B] replaces all digit A with digit B
  • [oct] convert the number to octal (then treat that as a new decimal value)
  • [bksp] remove the rightmost digit (0 stays 0)

read more...


All posts