exp = File.read!("input") |> String.split("\n", trim: true) |> Enum.map(&String.to_integer/1) [part_1 | _] = for x <- exp, y <- exp, x + y == 2020, do: x * y IO.puts(part_1) [part_2 | _] = for x <- exp, y <- exp, z <- exp, x + y + z == 2020, do: x * y * z IO.puts(part_2)