Утнасун Муниев, 514 группа HalfMore 1451 | Гущин Александр Евгеньевич, 622 HalfMore 1777 | ||||
---|---|---|---|---|---|
n | 1 | cur_type = None | n | ||
2 | count = 0 | 1 | counter = 0 | ||
2 | elem = None | ||||
3 | while (n := input()): | 3 | while (a := input()): | ||
4 | if count == 0: | 4 | if counter == 0: | ||
5 | cur_type = n | 5 | elem = a | ||
6 | count = 1 | 6 | counter = 1 | ||
7 | elif cur_type == n: | 7 | elif a == elem: | ||
8 | count += 1 | 8 | counter += 1 | ||
9 | else: | 9 | else: | ||
t | 10 | count -= 1 | t | 10 | counter -= 1 |
11 | print(eval(cur_type)) | 11 | print(eval(elem)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|