Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Day $1

2022/_template.livemd

Day $1

Mix.install([
  {:kino, "~> 0.7.0"}
])

Input

textarea = Kino.Input.textarea("Input:")

Common

defmodule Common do
  def parse_input(raw_input) do
    raw_input
    |> String.split()
    |> Enum.map(fn line ->
      line
      |> String.trim()
      |> String.to_integer()
    end)
  end
end
raw_input = Kino.Input.read(textarea)
input = Common.parse_input(raw_input)

Part 1

defmodule Part1 do
  def run(input) do
  end
end
Part1.run(input)

Part 2

defmodule Part2 do
  def run(input) do
  end
end
Part2.run(input)