結果

問題 No.135 とりあえず1次元の問題
ユーザー JunOnumaJunOnuma
提出日時 2017-06-07 17:49:33
言語 Python2
(2.7.18)
結果
AC  
実行時間 146 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 7,112 KB
実行使用メモリ 15,044 KB
最終ジャッジ日時 2023-10-23 18:58:33
合計ジャッジ時間 1,732 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
15,044 KB
testcase_01 AC 11 ms
6,408 KB
testcase_02 AC 10 ms
6,408 KB
testcase_03 AC 10 ms
6,408 KB
testcase_04 AC 10 ms
6,408 KB
testcase_05 AC 11 ms
6,408 KB
testcase_06 AC 11 ms
6,408 KB
testcase_07 AC 11 ms
6,408 KB
testcase_08 AC 11 ms
6,408 KB
testcase_09 AC 10 ms
6,408 KB
testcase_10 AC 11 ms
6,408 KB
testcase_11 AC 10 ms
6,408 KB
testcase_12 AC 11 ms
6,420 KB
testcase_13 AC 11 ms
6,408 KB
testcase_14 AC 11 ms
6,456 KB
testcase_15 AC 11 ms
6,420 KB
testcase_16 AC 11 ms
6,468 KB
testcase_17 AC 11 ms
6,456 KB
testcase_18 AC 10 ms
6,408 KB
testcase_19 AC 12 ms
6,448 KB
testcase_20 AC 11 ms
6,428 KB
testcase_21 AC 83 ms
15,044 KB
testcase_22 AC 138 ms
15,044 KB
evil01.txt AC 118 ms
15,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
if len(l) == 1 or max(l) == min(l):
    print 0
else:
    mn = 10**7
    for i in range(n-1):
        d = l[i+1] - l[i]
        if d > 0:
            mn = min(mn,d)
    print mn
0