You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
require "advent"
|
|
INPUT = input(2020, 6).split("\n\n")
|
|
|
|
def part1
|
|
INPUT.sum &.chars.uniq!.count(&.ascii_letter?)
|
|
end
|
|
|
|
def part2
|
|
INPUT.sum &.lines.map(&.chars.to_set).intersect.size
|
|
end
|
|
|
|
puts part1
|
|
puts part2
|