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