#include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //abs(int) #include //swap, pair #include //deque #include //INT_MAX #include //bitset using namespace std; int main() { int N, K; cin >> N >> K; int max = 0; int min = INT_MAX; int temp; for (int i = 0; i < N; i++) { cin >> temp; if (temp < min) { min = temp; } if (temp > max) { max = temp; } } cout << max - min << endl; return 0; }