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