aoc2018/day1/day1.exs
2018-12-01 03:28:56 -03:00

10 lines
221 B
Elixir

# input treatment
input = IO.gets("input?")
|> String.trim
|> String.split(" ")
|> Enum.map(fn part ->
String.to_integer part
end)
res = Enum.sum(input)
IO.puts "answer: #{res}"