Почернина Ольга, 528 группа HalfMore 1309 | Гущин Александр Евгеньевич, 622 HalfMore 1777 | ||||
---|---|---|---|---|---|
n | 1 | count = 0 | n | 1 | counter = 0 |
2 | current_type = None | 2 | elem = None | ||
3 | while (x := input()): | 3 | while (a := input()): | ||
4 | if count == 0: | 4 | if counter == 0: | ||
5 | current_type = x | 5 | elem = a | ||
6 | count = 1 | 6 | counter = 1 | ||
7 | elif x == current_type: | 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(current_type)) | 11 | print(eval(elem)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|