Browse Source

Day 10

master
Chris Smith 8 years ago
parent
commit
901f208020
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      10.py

+ 10
- 0
10.py View File

@@ -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…
Cancel
Save