import math
n = int(input())
rawData = list( map(int, input().split()) )
#print(rawData)
rawData.sort()
#print(rawData)
reList = []
for i in range(0, len(rawData)-1):
reList.append(math.fabs( rawData[i] - rawData[i+1] ))
print(int(min(reList)))
import math
n = int(input())
rawData = list( map(int, input().split()) )
#print(rawData)
rawData.sort()
#print(rawData)
reList = []
for i in range(0, len(rawData)-1):
reList.append(math.fabs( rawData[i] - rawData[i+1] ))
print(int(min(reList)))
本文标题:201712-1(Python实现)
本文链接:https://www.haomeiwen.com/subject/rhoigctx.html
网友评论