Skip to content

Instantly share code, notes, and snippets.

@josephsdavid
Last active December 2, 2022 01:50
Show Gist options
  • Save josephsdavid/fc933bca079cbf6deca2680965fe3db0 to your computer and use it in GitHub Desktop.
Save josephsdavid/fc933bca079cbf6deca2680965fe3db0 to your computer and use it in GitHub Desktop.
advent of code day 1
read_input_string(s) = parse.(Int64, filter(!isempty, split.(split(s, "\n\n"))))
@info "1a" maximum(sum, read_input_string(read("input.txt")))
@info "1b" (sum ∘ x->last(x, 3))(sort(sum.(read_input_string(read("input.txt")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment