parent
5fa382329f
commit
e49d6c4bef
@ -1,6 +1,6 @@
|
|||||||
# p ARGF.read.split("\n\n").map {|g| g.gsub("\n", "").chars.uniq.count }.sum
|
|
||||||
p ARGF.read.split("\n\n").map {|group|
|
p ARGF.read.split("\n\n").map {|group|
|
||||||
people = group.split("\n").map(&:chars)
|
group.split("\n").map(&:chars)
|
||||||
first = people.shift
|
}.map {|group|
|
||||||
first.count {|answer| people.all? {|answers| answers.include?(answer) }}
|
# group.inject(&:|)
|
||||||
}.sum
|
group.inject(&:&)
|
||||||
|
}.map(&:size).sum
|
||||||
|
Loading…
Reference in new issue