Skip to content

Instantly share code, notes, and snippets.

@sarahzrf
Created December 8, 2021 07:06
Show Gist options
  • Save sarahzrf/be88b41b6453ff254d148d6f644a5932 to your computer and use it in GitHub Desktop.
Save sarahzrf/be88b41b6453ff254d148d6f644a5932 to your computer and use it in GitHub Desktop.
count = 0
$<.each do |l|
outs = l.chomp.split(' | ')[1].split
count += outs.count {|o| [2, 4, 3, 7].include? o.length}
end
print count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment