#H. 最大值和最小值的差

    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.

【题目描述】

输出一个整数序列中最大的数和最小的数的差。

【输入】

第一行为M,表示整数个数,整数个数不会大于10000;

第二行为M个整数,以空格隔开,每个整数的绝对值不会大于10000。

【输出】

输出M个数中最大值和最小值的差。

【输入样例】

5
2 5 7 4 2

【输出样例】

5

【来源】

一本通在线评测

初一期中考

Not Attended
Status
Done
Rule
IOI
Problem
10
Start at
2023-4-17 8:45
End at
2023-4-17 18:45
Duration
10 hour(s)
Host
Partic.
114