結果

問題 No.135 とりあえず1次元の問題
ユーザー u
提出日時 2018-03-09 14:17:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 288 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,668 KB
最終ジャッジ日時 2024-10-08 10:04:50
合計ジャッジ時間 9,066 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 RE * 1 TLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

N = int(input())

if N == 1:
    print(0)
    sys.exit()

l = sorted([int(i) for i in input().split()], reverse=True)

diff_close_l = []

for i in range(N-1):
    diff_close_l.append(l[i] - l[i+1])

while 0 in diff_close_l:
    diff_close_l.remove(0)

print(min(diff_close_l))
0