Морозова Вероника Геннадьевна, 321 PackedQueue 2806 | Батталова Лина 424 PackedQueue 2261 | ||||
---|---|---|---|---|---|
n | 1 | s = eval(input()) | n | 1 | tasks = eval(input()) |
2 | a = [] | 2 | queue = [] | ||
3 | for elem in s: | 3 | for el in tasks: | ||
4 | if type(elem) is tuple: | 4 | if type(el) is tuple: | ||
5 | a += elem | 5 | queue += el | ||
6 | elif type(elem) is int: | 6 | elif type(el) is int: | ||
7 | if len(a) < elem: | 7 | if len(queue) < el: | ||
8 | break | 8 | break | ||
t | 9 | else: | t | ||
10 | print(tuple(a[:elem])) | 9 | print(tuple(queue[:el])) | ||
11 | a = a[elem:] | 10 | queue = queue[el:] |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|