結果

問題 No.135 とりあえず1次元の問題
ユーザー a_tena_ten
提出日時 2016-03-24 14:04:27
言語 Python2
(2.7.18)
結果
AC  
実行時間 178 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 567 ms
コンパイル使用メモリ 6,988 KB
実行使用メモリ 14,756 KB
最終ジャッジ日時 2023-09-02 00:21:16
合計ジャッジ時間 2,026 ms
ジャッジサーバーID
(参考情報)
judge11 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 174 ms
14,644 KB
testcase_01 AC 11 ms
6,068 KB
testcase_02 AC 11 ms
6,220 KB
testcase_03 AC 11 ms
6,152 KB
testcase_04 AC 11 ms
6,328 KB
testcase_05 AC 11 ms
6,136 KB
testcase_06 AC 11 ms
6,168 KB
testcase_07 AC 12 ms
6,232 KB
testcase_08 AC 11 ms
6,116 KB
testcase_09 AC 12 ms
6,228 KB
testcase_10 AC 11 ms
6,052 KB
testcase_11 AC 12 ms
6,132 KB
testcase_12 AC 12 ms
6,332 KB
testcase_13 AC 12 ms
6,048 KB
testcase_14 AC 13 ms
6,376 KB
testcase_15 AC 12 ms
6,180 KB
testcase_16 AC 12 ms
6,160 KB
testcase_17 AC 13 ms
6,164 KB
testcase_18 AC 12 ms
6,244 KB
testcase_19 AC 13 ms
6,260 KB
testcase_20 AC 12 ms
6,172 KB
testcase_21 AC 121 ms
14,752 KB
testcase_22 AC 178 ms
14,756 KB
evil01.txt WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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