Александр Цехмистер, 527 группа HalfMore 735 | llilyshkall HalfMore 1033 | ||||
---|---|---|---|---|---|
n | 1 | object = eval(input()) | n | 1 | name_type = eval(input()) |
2 | count = 1 | 2 | count_type = 1 | ||
3 | while (el := input()) != '': | 3 | while (line := input()) != '': | ||
4 | el = eval(el) | 4 | tmp_type = eval(line) | ||
5 | if el == object: | 5 | if tmp_type == name_type: | ||
6 | count += 1 | 6 | count_type += 1 | ||
7 | else: | 7 | else: | ||
t | 8 | count -= 1 | t | 8 | count_type -= 1 |
9 | if count == 0: | 9 | if count_type < 0: | ||
10 | object = el | 10 | name_type = tmp_type | ||
11 | count = 1 | 11 | count_type = 1 | ||
12 | print(object) | 12 | print(name_type) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|