結果

問題 No.135 とりあえず1次元の問題
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2015-12-20 11:47:00
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 266 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 19,008 KB
最終ジャッジ日時 2023-09-01 22:59:32
合計ジャッジ時間 9,242 ms
ジャッジサーバーID
(参考情報)
judge16 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
14,636 KB
testcase_01 AC 11 ms
6,040 KB
testcase_02 AC 12 ms
6,080 KB
testcase_03 RE -
testcase_04 AC 12 ms
6,104 KB
testcase_05 AC 11 ms
6,036 KB
testcase_06 AC 11 ms
5,996 KB
testcase_07 AC 12 ms
6,152 KB
testcase_08 AC 12 ms
5,960 KB
testcase_09 AC 12 ms
6,200 KB
testcase_10 AC 12 ms
5,972 KB
testcase_11 AC 11 ms
5,996 KB
testcase_12 AC 12 ms
6,004 KB
testcase_13 AC 11 ms
6,088 KB
testcase_14 AC 12 ms
6,048 KB
testcase_15 AC 12 ms
6,008 KB
testcase_16 AC 12 ms
6,220 KB
testcase_17 AC 12 ms
6,112 KB
testcase_18 AC 11 ms
6,200 KB
testcase_19 AC 12 ms
6,268 KB
testcase_20 AC 12 ms
6,132 KB
testcase_21 AC 940 ms
14,556 KB
testcase_22 TLE -
evil01.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
li = map(int, raw_input().split())
#print li

li.sort()
#print li

dist = []
if N <= 1:
    print 0
else:
    for i in xrange(N-1):
        dist.append(li[i+1] - li[i])
        
#print dist

while 0 in dist:
    dist.remove(0)
#print dist
print min(dist)
0