結果

問題 No.135 とりあえず1次元の問題
ユーザー togatogatogatoga
提出日時 2015-08-22 12:17:06
言語 Python2
(2.7.18)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 6,680 KB
実行使用メモリ 16,088 KB
最終ジャッジ日時 2023-09-01 21:33:16
合計ジャッジ時間 1,992 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
16,088 KB
testcase_01 AC 11 ms
5,972 KB
testcase_02 AC 11 ms
6,036 KB
testcase_03 AC 11 ms
5,996 KB
testcase_04 AC 11 ms
6,224 KB
testcase_05 AC 11 ms
5,972 KB
testcase_06 AC 11 ms
6,228 KB
testcase_07 AC 11 ms
6,172 KB
testcase_08 AC 11 ms
6,212 KB
testcase_09 AC 12 ms
6,116 KB
testcase_10 AC 11 ms
6,224 KB
testcase_11 AC 12 ms
6,048 KB
testcase_12 AC 11 ms
6,132 KB
testcase_13 AC 12 ms
6,076 KB
testcase_14 AC 12 ms
6,140 KB
testcase_15 AC 12 ms
6,076 KB
testcase_16 AC 12 ms
6,264 KB
testcase_17 AC 12 ms
6,288 KB
testcase_18 AC 12 ms
6,112 KB
testcase_19 AC 12 ms
6,184 KB
testcase_20 AC 12 ms
6,176 KB
testcase_21 AC 62 ms
14,732 KB
testcase_22 AC 136 ms
16,056 KB
evil01.txt AC 116 ms
15,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
A = map(int, raw_input().split())
B = list(set(A))
B.sort()
ans = 1 << 50
for i in range(1, len(B)):
    ans = min(ans,  abs(B[i] - B[i - 1]))
if (ans == 1 << 50):
    print 0
else:
    print ans
0