結果

問題 No.135 とりあえず1次元の問題
ユーザー ryusukeryusuke
提出日時 2022-01-28 20:41:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 5,000 ms
コード長 219 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 87,364 KB
実行使用メモリ 91,152 KB
最終ジャッジ日時 2023-08-28 18:09:55
合計ジャッジ時間 3,088 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
90,872 KB
testcase_01 AC 68 ms
71,484 KB
testcase_02 AC 66 ms
71,004 KB
testcase_03 AC 70 ms
71,428 KB
testcase_04 AC 66 ms
71,264 KB
testcase_05 AC 67 ms
71,268 KB
testcase_06 AC 67 ms
71,340 KB
testcase_07 AC 66 ms
71,316 KB
testcase_08 AC 68 ms
71,296 KB
testcase_09 AC 67 ms
71,396 KB
testcase_10 AC 67 ms
71,232 KB
testcase_11 AC 69 ms
71,408 KB
testcase_12 AC 68 ms
71,400 KB
testcase_13 AC 66 ms
71,244 KB
testcase_14 AC 67 ms
71,264 KB
testcase_15 AC 66 ms
71,376 KB
testcase_16 AC 67 ms
71,256 KB
testcase_17 AC 67 ms
71,328 KB
testcase_18 AC 68 ms
71,264 KB
testcase_19 AC 69 ms
71,184 KB
testcase_20 AC 70 ms
71,484 KB
testcase_21 AC 90 ms
90,384 KB
testcase_22 AC 105 ms
91,152 KB
evil01.txt AC 97 ms
91,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int, input().split()))

ans = 10 ** 18
x.sort()
for i in range(n - 1):
    if x[i] == x[i + 1]: continue
    ans = min(ans, abs(x[i + 1] - x[i]))
print(ans) if ans != 10 ** 18 else print(0)
0