Last active
December 2, 2022 01:50
-
-
Save josephsdavid/fc933bca079cbf6deca2680965fe3db0 to your computer and use it in GitHub Desktop.
advent of code day 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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