from itertools import groupby
a='1'
for i in range(30):
a = ''.join(str(len(list(v))) + k for k,v in groupby(a))
print len(a)
Python challenge - level 10
最新推荐文章于 2020-06-15 12:58:29 发布
from itertools import groupby
a='1'
for i in range(30):
a = ''.join(str(len(list(v))) + k for k,v in groupby(a))
print len(a)