瀏覽代碼

Day 10

master
Chris Smith 8 年之前
父節點
當前提交
901f208020
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      10.py

+ 10
- 0
10.py 查看文件

@@ -0,0 +1,10 @@
1
+#!/usr/bin/python
2
+
3
+import re
4
+
5
+input = '1113222113'
6
+
7
+for _ in range(50):
8
+    input = ''.join(str(1 + len(m[1])) + m[0] for m in re.findall('(.)(\\1*)', input))
9
+
10
+print len(input)

Loading…
取消
儲存