| LookSay/abatueva | LookSay/s9160605122 | ||||
|---|---|---|---|---|---|
| f | 1 | from itertools import groupby | f | 1 | from itertools import groupby |
| 2 | 2 | ||||
| 3 | def LookSay(): | 3 | def LookSay(): | ||
| n | 4 | num = '1' | n | 4 | x = '1' |
| 5 | yield int(num) | 5 | yield int(x) | ||
| 6 | while True: | 6 | while True: | ||
| t | 7 | num = ''.join((str(len(list(nums))) + n for (n, nums) in groupby(num))) | t | 7 | x = ''.join((str(len(list(g))) + k for (k, g) in groupby(x))) |
| 8 | for ch in num: | 8 | for c in x: | ||
| 9 | yield int(ch) | 9 | yield int(c) | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||