python 题解
2025-08-09 20:11:16
发布于:安徽
0阅读
0回复
0点赞
用最笨的法子硬解
n = int(input())
s = input().split()
lst = []
for i in s:
i = int(i)
if i not in lst:
lst.append(i)
lst1 = []
for i in lst:
a = 0
for j in s:
if int(j) == i:
a += 1
lst1.append(a)
for i in range(len(lst1)):
if lst1[i] > n / 2:
print(lst[i])
这里空空如也
有帮助,赞一个