Антон Карлстедт, 321 HalfMore 1245 | Шагов Виталий 521 HalfMore 1543 | ||||
---|---|---|---|---|---|
n | 1 | amount = 0 | n | 1 | s = 0 |
2 | obj = None | 2 | res = None | ||
3 | while (s := input()): | 3 | while (x := input()): | ||
4 | s = eval(s) | 4 | x = eval(x) | ||
5 | if amount == 0: | 5 | if s == 0: | ||
6 | obj = s | 6 | res = x | ||
7 | amount += 1 | 7 | s += 1 | ||
8 | elif obj == s: | 8 | if x == res: | ||
9 | amount += 1 | 9 | s += 1 | ||
10 | else: | 10 | else: | ||
t | 11 | amount -= 1 | t | 11 | s -= 1 |
12 | print(obj) | 12 | print(res) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|