結果

問題 No.135 とりあえず1次元の問題
ユーザー brthyyjpbrthyyjp
提出日時 2020-12-05 15:37:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 106,712 KB
最終ジャッジ日時 2023-10-13 22:05:59
合計ジャッジ時間 3,953 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
106,712 KB
testcase_01 AC 74 ms
71,264 KB
testcase_02 AC 75 ms
71,152 KB
testcase_03 WA -
testcase_04 AC 74 ms
70,852 KB
testcase_05 AC 75 ms
71,188 KB
testcase_06 AC 75 ms
71,228 KB
testcase_07 AC 74 ms
70,852 KB
testcase_08 AC 74 ms
71,384 KB
testcase_09 AC 76 ms
71,004 KB
testcase_10 AC 76 ms
71,516 KB
testcase_11 AC 76 ms
71,312 KB
testcase_12 AC 76 ms
71,256 KB
testcase_13 AC 76 ms
70,848 KB
testcase_14 AC 77 ms
71,408 KB
testcase_15 AC 77 ms
71,572 KB
testcase_16 AC 76 ms
70,856 KB
testcase_17 AC 75 ms
71,200 KB
testcase_18 AC 75 ms
71,252 KB
testcase_19 AC 76 ms
71,236 KB
testcase_20 AC 75 ms
71,468 KB
testcase_21 WA -
testcase_22 AC 129 ms
106,628 KB
evil01.txt AC 119 ms
106,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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