結果

問題 No.135 とりあえず1次元の問題
ユーザー a_tena_ten
提出日時 2016-03-23 22:09:38
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 241 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 6,680 KB
実行使用メモリ 20,728 KB
最終ジャッジ日時 2023-09-02 00:20:58
合計ジャッジ時間 2,673 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
20,716 KB
testcase_01 AC 12 ms
6,228 KB
testcase_02 AC 11 ms
6,272 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 AC 12 ms
6,244 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 12 ms
6,228 KB
testcase_20 WA -
testcase_21 AC 91 ms
14,692 KB
testcase_22 AC 151 ms
20,728 KB
evil01.txt AC 117 ms
15,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8

from math import fabs

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

sorted(X)

n=set()
for i in range(N-1):
	n.add(fabs(X[i]-X[i+1]))

n.add(fabs(X[-1]-X[-2]))

if 0 in n:
	n.remove(0) 
	print int(min(n))
else:
	print int(min(n))
0