[2016][ruby][6.x] speedcoding
change zzpnvxmxytykxwtwvxwktvywvkxpnwtx
commit cda6a78458b9e3dd7484c8493ddbe3fe00563ad4
author Alpha Chen <alpha.chen@gmail.com>
date
parent wnzpumuv
diff --git a/2016/ruby/day_06.rb b/2016/ruby/day_06.rb
new file mode 100644
index 0000000..203b78e
--- /dev/null
+++ b/2016/ruby/day_06.rb
@@ -0,0 +1,9 @@
+counts = Array.new(8) { Hash.new(0) }
+DATA.read.lines.each.with_object(counts) do |line, counts|
+  (0..7).each do |i|
+    counts[i][line[i]] += 1
+  end
+end
+p counts.map {|h| h.sort_by(&:last).first.first }.join
+
+__END__