let N = Int(readLine()!)! let K = Int(readLine()!)! var n = [Int]() for count in 1...N{ n.append(Int(readLine()!)!) } print(n.max()! - n.min()!)