aboutsummaryrefslogtreecommitdiffstats
path: root/AoC2022/01/solver.jl
blob: 104d2244d023f7c700fe9c2c58a5f31fb2372f1c (plain)
1
2
3
4
5
6
7
8
9
10
using Test

rations = open("input", "r") do f
    map(x -> parse.(Int, eachsplit(x)) |> sum, eachsplit(read(f, String), "\n\n")) |> sort
end

@testset "solutions" begin
    @test last(rations) == 75622
    @test rations[end-2:end] |> sum == 213159
end