VarRandom/VladislavKotX | VarRandom/Mik | ||||
---|---|---|---|---|---|
n | 1 | from itertools import cycle | n | 1 | from itertools import * |
2 | from random import randint | 2 | from random import randint | ||
3 | 3 | ||||
4 | def randomes(seq): | 4 | def randomes(seq): | ||
t | 5 | ans = [(a1, a2) for (a1, a2) in seq] | t | 5 | L = [(i1, i2) for (i1, i2) in seq] |
6 | for (a1, a2) in cycle(ans): | 6 | for (m, n) in cycle(L): | ||
7 | yield randint(a1, a2) | 7 | yield randint(m, n) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|