結果

問題 No.135 とりあえず1次元の問題
ユーザー lloyzlloyz
提出日時 2023-09-06 00:31:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 188 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 100,804 KB
最終ジャッジ日時 2023-09-06 00:31:23
合計ジャッジ時間 3,260 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
100,804 KB
testcase_01 AC 68 ms
71,068 KB
testcase_02 AC 66 ms
71,580 KB
testcase_03 AC 66 ms
71,384 KB
testcase_04 AC 65 ms
71,616 KB
testcase_05 AC 68 ms
71,236 KB
testcase_06 AC 68 ms
71,344 KB
testcase_07 AC 70 ms
71,300 KB
testcase_08 AC 70 ms
71,104 KB
testcase_09 AC 68 ms
71,116 KB
testcase_10 AC 69 ms
71,556 KB
testcase_11 AC 68 ms
71,396 KB
testcase_12 AC 73 ms
71,360 KB
testcase_13 AC 69 ms
71,084 KB
testcase_14 AC 68 ms
71,304 KB
testcase_15 AC 67 ms
71,240 KB
testcase_16 AC 69 ms
71,284 KB
testcase_17 AC 69 ms
71,084 KB
testcase_18 AC 69 ms
71,400 KB
testcase_19 AC 71 ms
71,476 KB
testcase_20 AC 67 ms
71,308 KB
testcase_21 AC 81 ms
84,080 KB
testcase_22 AC 115 ms
100,712 KB
evil01.txt AC 104 ms
100,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

input()
X = list(set(map(int, input().split())))

n = len(X)
if n == 1:
    print(0)
    exit()
X.sort()
ans = 10**18
for i in range(n - 1):
    ans = min(ans, X[i + 1] - X[i])
print(ans)
0