結果

問題 No.135 とりあえず1次元の問題
ユーザー togatogatogatoga
提出日時 2015-08-22 12:10:42
言語 Python2
(2.7.18)
結果
AC  
実行時間 176 ms / 5,000 ms
コード長 235 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 15,052 KB
最終ジャッジ日時 2025-01-03 07:30:38
合計ジャッジ時間 2,294 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
A = map(int, raw_input().split())
A.sort()
ans = 1 << 50
for i in range(1, len(A)):
    if (A[i] == A[i - 1]):
        continue
    ans = min(ans,  abs(A[i] - A[i - 1]))
if (ans == 1 << 50):
    print 0
else:
    print ans
0