Day 10.0
change
commit 19baf573fe4ab74e2e558a70dc7c11339826be23
author Alpha Chen <alpha.chen@gmail.com>
date
parent d1dd6f2b
diff --git a/day_10.rb b/day_10.rb
new file mode 100644
index 0000000..bd37d66
--- /dev/null
+++ b/day_10.rb
@@ -0,0 +1,9 @@
+class Integer
+  def look_and_say
+    self.to_s.chars.slice_when {|a,b| a != b }.map {|i| "#{i.size}#{i[0]}" }.join.to_i
+  end
+end
+
+seed = 1113122113
+40.times { seed = seed.look_and_say }
+puts seed.to_s.size