結果

問題 No.135 とりあえず1次元の問題
ユーザー netyo715netyo715
提出日時 2021-06-21 10:26:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 186 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 24,384 KB
最終ジャッジ日時 2023-09-05 01:48:35
合計ジャッジ時間 2,380 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
24,384 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 RE -
testcase_03 AC 16 ms
8,236 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 16 ms
7,868 KB
testcase_13 AC 15 ms
7,876 KB
testcase_14 AC 16 ms
7,956 KB
testcase_15 AC 16 ms
7,824 KB
testcase_16 RE -
testcase_17 AC 16 ms
7,852 KB
testcase_18 AC 15 ms
7,796 KB
testcase_19 AC 16 ms
7,872 KB
testcase_20 AC 16 ms
7,796 KB
testcase_21 RE -
testcase_22 RE -
evil01.txt AC 115 ms
24,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = list(set(map(int, input().split())))
X.sort()
if len(X)==1:
    print(0)
    exit()
ans = 10**10
for i in range(N-1):
    ans = min(ans, abs(X[i]-X[i+1]))
print(ans)
0