7-6 求整数序列中出现次数最多的数 (15分)

在这里插入图片描述

代码

s = input().split()[1:]
a = 0
for i in set(s):
    if s.count(i) > a:
        a = s.count(i)
        num = i
print(num,a)
发布了24 篇原创文章 · 获赞 2 · 访问量 208

猜你喜欢

转载自blog.csdn.net/weixin_45115928/article/details/104426676
今日推荐