結果

問題 No.135 とりあえず1次元の問題
ユーザー otsunekootsuneko
提出日時 2021-05-07 09:20:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 5,000 ms
コード長 237 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 91,708 KB
最終ジャッジ日時 2023-10-13 00:25:21
合計ジャッジ時間 3,729 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
91,604 KB
testcase_01 AC 73 ms
71,328 KB
testcase_02 AC 74 ms
71,360 KB
testcase_03 AC 74 ms
71,436 KB
testcase_04 AC 71 ms
71,132 KB
testcase_05 AC 70 ms
71,348 KB
testcase_06 AC 73 ms
71,184 KB
testcase_07 AC 71 ms
71,220 KB
testcase_08 AC 72 ms
71,412 KB
testcase_09 AC 74 ms
71,220 KB
testcase_10 AC 71 ms
71,320 KB
testcase_11 AC 70 ms
71,436 KB
testcase_12 AC 72 ms
71,148 KB
testcase_13 AC 72 ms
71,500 KB
testcase_14 AC 73 ms
71,296 KB
testcase_15 AC 70 ms
71,004 KB
testcase_16 AC 72 ms
71,496 KB
testcase_17 AC 71 ms
71,352 KB
testcase_18 AC 71 ms
71,208 KB
testcase_19 AC 72 ms
71,152 KB
testcase_20 AC 72 ms
71,156 KB
testcase_21 AC 95 ms
91,068 KB
testcase_22 AC 110 ms
91,708 KB
evil01.txt AC 102 ms
91,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = sorted(list(map(int,input().split())))

min_d = float("INF")
for i in range(N-1):
    if X[i] != X[i+1]:
        min_d = min(min_d, X[i+1]-X[i])
if min_d != float("INF"):
    print(min_d)
else:
    print(0)
0