You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
advent-of-code/2020/ruby/day_06.rb

7 lines
147 B

p ARGF.read.split("\n\n").map {|group|
group.split("\n").map(&:chars)
}.map {|group|
# group.inject(&:|)
group.inject(&:&)
}.map(&:size).sum