浙大版《Python 程序设计》题目集 第3章-6 求整数序列中出现次数最多的数 (15分)

li = list(input().split())[1:]
d = {}
for each in set(li):
    d[li.count(each)] = each

max_count = max(d.keys())
max_number = d.get(max_count)
print(max_number,int(max_count))
发布了33 篇原创文章 · 获赞 0 · 访问量 260

猜你喜欢

转载自blog.csdn.net/weixin_42229583/article/details/104573259
今日推荐