import java.lang.Math fun main( args : Array ) { readLine() val bs = readLine()!! .split(" ") .map { it.toInt() } val cs = mutableSetOf() bs.mapIndexed { i, x-> for(j in (i+1..bs.size-1)){ val last = bs[j] val delta = Math.abs( last - x ) cs.add( delta ) } } println( cs.min() ) }