func main() var n: int :: cui@inputInt() var k: int :: cui@inputInt() var a: []int :: #[n + 1]int for i(1, n) do a[i] :: cui@inputInt() end for do a.sort() do cui@print("\{a[n] - a[1]}\n") end func