(define (System.out.println x) (begin (display x) (newline) ) ) (let ( (N (read)) ) (let loop( (foo (read)) (bar '()) ) (if (not (eof-object? foo)) (loop (read) (cons foo bar)) (let loop2( (i 0) (Min 0) (ls (sort bar <)) ) (if (and (not (= (list-ref ls i) (list-ref ls (+ i 1)))) (or (< (abs (- (list-ref ls i) (list-ref ls (+ i 1)))) Min) (= Min 0))) (if (= i (- (length ls) 2)) (System.out.println (abs (- (list-ref ls i) (list-ref ls (+ i 1))))) (loop2 (+ i 1) (abs (- (list-ref ls i) (list-ref ls (+ i 1)))) ls) ) (if (= i (- (length ls) 2)) (System.out.println Min) (loop2 (+ i 1) Min ls) ) ) ) ) ) )