結果

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

テストケース

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

ソースコード

diff #

n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
if len(l) == 1:
    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