Python
2024-10-26 15:49:48
发布于:广东
0阅读
0回复
0点赞
n = int(input())
nums = list(map(int, input().split()))
candidate = None
count = 0
for num in nums:
if count == 0:
candidate = num
count = 1
elif num == candidate:
count += 1
else:
count -= 1
print(candidate)
这里空空如也
有帮助,赞一个