Chris Smith 8 anni fa
parent
commit
901f208020
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10
    0
      10.py

+ 10
- 0
10.py Vedi 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…
Annulla
Salva