Array Range
Easy · rating 900 · Arrays
The first line contains n. The second line has n integers. Print the difference between the largest and smallest (the range).
Constraints: 1 ≤ n ≤ 105, |ai| ≤ 109
Related problems
- Add Two Arrays — Easy
- Alternating Sum — Easy
- Class Average — Easy
- Count Even Numbers — Easy
- Floor of Average — Easy
- Sum of Even Elements — Easy