結果

問題 No.135 とりあえず1次元の問題
コンテスト
ユーザー ymgckyo
提出日時 2017-11-04 12:47:20
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 202 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 458 ms
コンパイル使用メモリ 15,104 KB
実行使用メモリ 20,948 KB
最終ジャッジ日時 2026-09-28 13:09:51
合計ジャッジ時間 3,005 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
ls = list(map(int, input().split()))

shortest = max(ls)
for i in range(1, len(ls)):
    tmp = abs(ls[i - 1] - ls[i])
    if 0 < tmp < shortest:
        shortest = tmp

print(shortest)
0