Advent of code 2015 solutions https://adventofcode.com/2015/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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