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.
 
 
 
 
AdventOfCode-2020/day6.cr

13 lines
211 B

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