結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
106,496 KB
testcase_01 AC 68 ms
71,212 KB
testcase_02 AC 66 ms
71,184 KB
testcase_03 WA -
testcase_04 AC 68 ms
71,236 KB
testcase_05 AC 67 ms
71,308 KB
testcase_06 AC 67 ms
71,200 KB
testcase_07 AC 69 ms
71,300 KB
testcase_08 AC 68 ms
71,336 KB
testcase_09 AC 67 ms
71,332 KB
testcase_10 AC 67 ms
71,520 KB
testcase_11 AC 68 ms
71,008 KB
testcase_12 AC 69 ms
70,848 KB
testcase_13 AC 67 ms
71,264 KB
testcase_14 AC 68 ms
71,344 KB
testcase_15 AC 67 ms
71,188 KB
testcase_16 AC 68 ms
71,232 KB
testcase_17 AC 66 ms
71,344 KB
testcase_18 AC 67 ms
71,088 KB
testcase_19 AC 67 ms
71,336 KB
testcase_20 AC 69 ms
71,188 KB
testcase_21 WA -
testcase_22 AC 119 ms
106,552 KB
evil01.txt AC 110 ms
106,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
X = list(map(int, input().split()))
X = list(set(X))
if len(X) == 1:
    print(0)
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