D. 数列极差

    Type: Default 1000ms 256MiB

数列极差

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.

###【题目描述】 在黑板上写了 NN 个正整数作成的一个数列,进行如下操作:每一次擦去其中的两个数 aabb ,然后在数列中加入一个数 a×b+1a×b+1 ,如此下去直至黑板上剩下一个数,在所有按这种操作方式最后得到的数中,最大的 max\max ,最小的为 min\min ,则该数列的极差定义为 M=maxminM= \max − \min

###【输入格式】 第一行,一个数为 NN ;

第二行, NN 个数。

###【输出格式】 输出极差。

###【输入样例】

3
1 2 3

###【输出样例】

2

9.21集训班作业

Not Attended
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