VarRandom/romantsovmike | VarRandom/dakyun | ||||
---|---|---|---|---|---|
f | 1 | from random import randint | f | 1 | from random import randint |
2 | 2 | ||||
3 | def randomes(seq): | 3 | def randomes(seq): | ||
t | 4 | new_seq = [] | t | 4 | s = [] |
5 | for el in seq: | 5 | for elem in seq: | ||
6 | el_lst = list(el) | 6 | elem = list(elem) | ||
7 | new_seq.append(el_lst) | 7 | s.append(elem) | ||
8 | yield randint(el_lst[0], el_lst[1]) | ||||
9 | while new_seq: | ||||
10 | for el in new_seq: | ||||
11 | yield randint(el[0], el[1]) | 8 | yield randint(elem[0], elem[1]) | ||
9 | while 1: | ||||
10 | for bound in s: | ||||
11 | yield randint(bound[0], bound[1]) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|