結果

問題 No.135 とりあえず1次元の問題
コンテスト
ユーザー Mario
提出日時 2018-04-30 11:57:52
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 150 ms / 5,000 ms
コード長 202 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 548 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 28,784 KB
最終ジャッジ日時 2026-03-16 06:18:52
合計ジャッジ時間 4,305 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

num = int(input())
points = list(set(map(int, input().split())))
points.sort()

dist = [abs(points[n] - points[n + 1]) for n in range(len(points) - 1)]

if dist:
    print(min(dist))
else:
    print(0)
0