Казимагамедов Тагир 424 HalfMore 660 | Гущин Александр Евгеньевич, 622 HalfMore 1777 | ||||
---|---|---|---|---|---|
n | 1 | ans = None | n | ||
2 | cnt = 0 | 1 | counter = 0 | ||
2 | elem = None | ||||
3 | while (elem := input()): | 3 | while (a := input()): | ||
4 | if cnt == 0: | 4 | if counter == 0: | ||
5 | ans = elem | 5 | elem = a | ||
6 | cnt = 1 | 6 | counter = 1 | ||
7 | elif ans == elem: | 7 | elif a == elem: | ||
8 | cnt += 1 | 8 | counter += 1 | ||
9 | else: | 9 | else: | ||
t | 10 | cnt -= 1 | t | 10 | counter -= 1 |
11 | print(eval(ans)) | 11 | print(eval(elem)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|