Files
aoc2020/day_18/first.rb
2020-12-18 09:22:32 +01:00

14 lines
169 B
Ruby

input = File.readlines('./input')
class Integer
def -(other)
self * other
end
end
out = input.map do |line|
eval line.gsub('*', '-')
end
puts out.inject :+