結果

問題 No.135 とりあえず1次元の問題
ユーザー Hachimori
提出日時 2015-01-25 23:23:50
言語 Python2
(2.7.18)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 378 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 7,168 KB
実行使用メモリ 14,868 KB
最終ジャッジ日時 2025-01-03 02:59:38
合計ジャッジ時間 2,086 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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