finished solution 1

master
Jeff Yates 2020-12-06 08:11:51 -05:00
parent 10d8a8079c
commit 10794e411f
1 changed files with 10 additions and 0 deletions

10
day06/solution01.rb Executable file
View File

@ -0,0 +1,10 @@
#!/bin/env ruby
text = File.read('./input').split("\n\n")
text.map! do |t|
t.delete("\n").split('').uniq.reduce(:+)
end
size = text.map { |t| t.length }.reduce(:+)
p size