数数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
将读入 个数 ,计算众数与中位数:
众数是出现次数最多的数值,众数若有多个,给出最小的众数;
为偶数时,中位数为有序序列下最中间的两个数值的平均值,中位数需保留一位小数。
输入格式
第一行为一个正整数 。
第二行包含 个空格隔开的整数 。
输出格式
两个值:众数 中位数
(中位数需要保留一位小数)
样例
样例1
3
1 2 3
1 2.0
样例2
2
3 6
3 4.5
数据规模与约定
对于 的数据,。
对于 的数据,,。
XCPC 24寒假冬令营 练习5
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 3
- Start at
- 2024-2-26 3:00
- End at
- 2024-3-7 3:00
- Duration
- 240 hour(s)
- Host
- Partic.
- 1