aoc2020/day_01/first.rb
2020-12-01 11:45:43 +01:00

9 lines
137 B
Ruby

input = File.read('./input').lines.map(&:to_i)
input.each do |i|
input.each do |j|
(puts i*j; return) if i + j == 2020
end
end