LookSay/romantsovmike | LookSay/mishustina_margarita | ||||
---|---|---|---|---|---|
n | 1 | from itertools import groupby, chain | n | 1 | from itertools import groupby |
2 | 2 | ||||
3 | def LookSay(): | 3 | def LookSay(): | ||
4 | n = '1' | 4 | n = '1' | ||
t | 5 | while True: | t | 5 | while 1: |
6 | for s in n: | 6 | for j in n: | ||
7 | yield int(s) | 7 | yield int(j) | ||
8 | n = ''.join((str(len(list(gr))) + k for (k, gr) in groupby(n))) | 8 | n = ''.join((str(len(list(s))) + p for (p, s) in groupby(n))) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|