Run this notebook

Use Livebook to open this notebook and explore new ideas.

It is easy to get started, on your machine or the cloud.

Click below to open and run it in your Livebook at .

(or change your Livebook location)

# AOC 2025 Day 3 ## Section ```elixir defmodule Day03 do def data(:test) do ~s(987654321111111 811111111111119 234234234234278 818181911112111) ~s(987654321111111) end def data(:real) do File.read!("day_03.dat") end defp prep(data) do String.trim(data) |> String.split("\n") |> Enum.map(&(String.to_integer(&1) |> Integer.digits())) end def part_01(banks) do prep(banks) |> Enum.map(fn bank -> Enum.reduce(bank, %{first: 0, second: nil, last: 0, dir: nil}, fn _battery, acc -> acc end) end) end end Day03.data(:test) |> Day03.part_01() ```
See source

Have you already installed Livebook?

If you already installed Livebook, you can configure the default Livebook location where you want to open notebooks.
Livebook up Checking status We can't reach this Livebook (but we saved your preference anyway)
Run notebook

Not yet? Install Livebook in just a minute

Livebook is open source, free, and ready to run anywhere.

Run in the cloud

on select platforms

To run on Linux, Docker, embedded devices, or Elixir’s Mix, check our README.

PLATINUM SPONSORS
SPONSORS
Code navigation with go to definition of modules and functions Read More