結果

問題 No.135 とりあえず1次元の問題
ユーザー HachimoriHachimori
提出日時 2015-01-25 23:23:50
言語 Python2
(2.7.18)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 378 bytes
コンパイル時間 401 ms
使用メモリ 14,660 KB
最終ジャッジ日時 2023-01-17 22:56:22
合計ジャッジ時間 2,493 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 127 ms
14,660 KB
evil01.txt AC 99 ms
14,464 KB
testcase_02 AC 11 ms
6,188 KB
testcase_03 AC 11 ms
5,908 KB
testcase_04 AC 10 ms
6,104 KB
testcase_05 AC 11 ms
6,092 KB
testcase_06 AC 11 ms
6,200 KB
testcase_07 AC 11 ms
6,948 KB
testcase_08 AC 10 ms
5,908 KB
testcase_09 AC 11 ms
6,148 KB
testcase_10 AC 11 ms
5,912 KB
testcase_11 AC 10 ms
5,972 KB
testcase_12 AC 11 ms
5,976 KB
testcase_13 AC 11 ms
6,160 KB
testcase_14 AC 11 ms
6,088 KB
testcase_15 AC 12 ms
6,200 KB
testcase_16 AC 11 ms
5,988 KB
testcase_17 AC 11 ms
5,944 KB
testcase_18 AC 12 ms
6,188 KB
testcase_19 AC 11 ms
6,948 KB
testcase_20 AC 12 ms
5,948 KB
testcase_21 AC 11 ms
5,988 KB
testcase_22 AC 67 ms
14,480 KB
testcase_23 AC 127 ms
14,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
#coding:utf8

def read():
    raw_input()
    return map(int, raw_input().split())


def work(vList):
    vList.sort()

    minV = 1 << 30
    for i in range(len(vList) - 1):
        if vList[i] != vList[i + 1]:
            minV = min(minV, vList[i + 1] - vList[i])

    print 0 if minV == (1 << 30) else minV


if __name__ == "__main__":
    work(read())
0