| VarRandom/meacca | VarRandom/Sharipov_Sait | ||||
|---|---|---|---|---|---|
| f | 1 | import random | f | 1 | import random |
| 2 | 2 | ||||
| 3 | def randomes(seq): | 3 | def randomes(seq): | ||
| n | 4 | seq_list = [] | n | 4 | segments = [] |
| 5 | for i in seq: | 5 | for i in seq: | ||
| n | 6 | add_list = list(i) | n | 6 | segment = [j for j in i] |
| 7 | seq_list.append(add_list) | 7 | segments.append(segment) | ||
| 8 | yield random.randint(add_list[0], add_list[1]) | 8 | yield random.randint(segment[0], segment[1]) | ||
| 9 | while True: | 9 | while True: | ||
| t | 10 | for (left, right) in seq_list: | t | 10 | for (left, right) in segments: |
| 11 | yield random.randint(left, right) | 11 | yield random.randint(left, right) | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||