数列极差
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.
###【题目描述】 在黑板上写了 个正整数作成的一个数列,进行如下操作:每一次擦去其中的两个数 和 ,然后在数列中加入一个数 ,如此下去直至黑板上剩下一个数,在所有按这种操作方式最后得到的数中,最大的 ,最小的为 ,则该数列的极差定义为 。
###【输入格式】 第一行,一个数为 ;
第二行, 个数。
###【输出格式】 输出极差。
###【输入样例】
3
1 2 3
###【输出样例】
2
9.21集训班作业
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2023-9-20 17:00
- End at
- 2023-9-27 15:40
- Duration
- 166.7 hour(s)
- Host
- Partic.
- 2