# use strict; # use warnings; chomp(my $N=<>); my $m = 0; if ($N ne '1') { chomp(my $x=<>); my @y = split(/ /, $x); my %z = map({$_ => undef} @y); my @Xs = sort({$a <=> $b} keys(%z)); if (scalar(@Xs) > 1) { $m = 'Inf'; my $p = shift(@Xs); foreach (@Xs) { my $d = $_ - $p; $m = $d if $d < $m; $p = $_; } } } print($m, "\n");