import Data.List main :: IO () main = interact $ show . solve . nub . sort . map read . tail . words solve :: [Int] -> Int solve [x] = 0 solve xs = minimum $ map (\x -> snd x - fst x) $ zip xs $ tail xs