解题思路:
注意事项:
参考代码:
import collections n = int(input()) nums = list(map(int, input().strip().split())) cnt = collections.Counter(nums).most_common() cnt.sort(key=lambda x: x[0]) for i, j in cnt: print(i, j)
0.0分
0 人评分
陶陶摘苹果 (C语言代码)浏览:1638 |
A+B for Input-Output Practice (V) (C++代码)浏览:473 |
WU-蓝桥杯算法提高VIP-交换Easy (C++代码)浏览:1180 |
【绝对值排序】 (C语言代码)浏览:890 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:693 |
数列问题 (C语言代码)浏览:1066 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:1023 |
C语言程序设计教程(第三版)课后习题10.3 (C语言代码)浏览:866 |
老王赛马 (C++代码)浏览:962 |
1073题解浏览:649 |