Батталова Лина 424 PackedQueue 2261 | Воронец Владимир, 319 группа PackedQueue 2795 | ||||
---|---|---|---|---|---|
n | 1 | tasks = eval(input()) | n | 1 | s = eval(input()) |
2 | queue = [] | 2 | a = [] | ||
3 | for el in tasks: | 3 | for ss in s: | ||
4 | if type(el) is tuple: | 4 | if type(ss) is tuple: | ||
5 | queue += el | 5 | a += ss | ||
6 | elif type(el) is int: | 6 | elif type(ss) is int: | ||
7 | if len(queue) < el: | 7 | if len(a) < ss: | ||
8 | break | 8 | break | ||
t | t | 9 | else: | ||
9 | print(tuple(queue[:el])) | 10 | print(tuple(a[:ss])) | ||
10 | queue = queue[el:] | 11 | a = a[ss:] |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|