diff --git a/day_02/second.rb b/day_02/second.rb index 4d29a48..98fc9a8 100644 --- a/day_02/second.rb +++ b/day_02/second.rb @@ -4,6 +4,5 @@ a = input.map do |pwl| matches = pwl.match /(?\d+)-(?\d+) (?\w): (?\w+)/ matches[:pw].chars.values_at(matches[:start].to_i-1, matches[:end].to_i-1).count(matches[:char]) end -puts a.inspect puts a.count(1)