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