結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
106,888 KB
testcase_01 AC 70 ms
71,292 KB
testcase_02 AC 69 ms
71,656 KB
testcase_03 AC 70 ms
71,556 KB
testcase_04 AC 69 ms
71,192 KB
testcase_05 AC 70 ms
71,508 KB
testcase_06 AC 70 ms
71,204 KB
testcase_07 AC 69 ms
71,144 KB
testcase_08 AC 69 ms
71,532 KB
testcase_09 AC 70 ms
71,148 KB
testcase_10 AC 69 ms
71,052 KB
testcase_11 AC 70 ms
71,344 KB
testcase_12 AC 69 ms
71,200 KB
testcase_13 AC 70 ms
71,200 KB
testcase_14 AC 69 ms
71,008 KB
testcase_15 AC 69 ms
71,356 KB
testcase_16 AC 68 ms
71,260 KB
testcase_17 AC 69 ms
71,656 KB
testcase_18 AC 69 ms
71,332 KB
testcase_19 AC 70 ms
71,264 KB
testcase_20 AC 69 ms
71,196 KB
testcase_21 WA -
testcase_22 AC 123 ms
106,788 KB
evil01.txt AC 112 ms
107,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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