AoC2020/day06/solution01.rb

10 lines
178 B
Ruby
Raw Normal View History

2020-12-06 13:11:51 +00:00
#!/bin/env ruby
text = File.read('./input').split("\n\n")
text.map! do |t|
t.delete("\n").split('').uniq.reduce(:+)
end
size = text.map { |t| t.length }.reduce(:+)
p size