1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
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 /solver.el?h=simpler' type='application/atom+xml'/>