結果

問題 No.135 とりあえず1次元の問題
コンテスト
ユーザー a_ten
提出日時 2016-03-24 14:04:27
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 270 bytes
記録
コンパイル時間 268 ms
コンパイル使用メモリ 77,252 KB
最終ジャッジ日時 2025-12-03 19:54:40
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#coding:utf-8

from math import fabs

N=input()
X=map(int,raw_input().split())

X.sort()

s=[]
for i in range(N):
	if i==len(X)-1:
		break
	else:
		s.append(int(fabs(X[i]-X[i+1])))

s.sort()

if len(set(s))==1:
	print 0
else:	
	for i in s:
		if i!=0:
			print i
			break
0