結果

問題 No.135 とりあえず1次元の問題
ユーザー tnodinotnodino
提出日時 2022-06-10 22:33:11
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 156 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 11,692 KB
実行使用メモリ 21,588 KB
最終ジャッジ日時 2023-10-21 05:27:42
合計ジャッジ時間 2,531 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
21,588 KB
testcase_01 AC 30 ms
10,076 KB
testcase_02 AC 30 ms
10,076 KB
testcase_03 AC 31 ms
10,076 KB
testcase_04 AC 31 ms
10,080 KB
testcase_05 AC 31 ms
10,080 KB
testcase_06 AC 31 ms
10,080 KB
testcase_07 AC 30 ms
10,080 KB
testcase_08 AC 30 ms
10,080 KB
testcase_09 AC 30 ms
10,080 KB
testcase_10 AC 32 ms
10,080 KB
testcase_11 AC 30 ms
10,080 KB
testcase_12 AC 30 ms
10,104 KB
testcase_13 AC 30 ms
10,080 KB
testcase_14 AC 31 ms
10,172 KB
testcase_15 AC 30 ms
10,104 KB
testcase_16 AC 30 ms
10,176 KB
testcase_17 AC 32 ms
10,172 KB
testcase_18 AC 30 ms
10,084 KB
testcase_19 AC 31 ms
10,156 KB
testcase_20 AC 31 ms
10,136 KB
testcase_21 AC 76 ms
20,868 KB
testcase_22 AC 156 ms
21,584 KB
evil01.txt AC 131 ms
21,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

INF = 1<<32
N = int(input())
X = list(map(int,input().split()))
X.sort()
ans = INF
for i in range(N-1):
    if X[i] == X[i+1]:
        continue
    ans = min(ans, X[i+1]-X[i])
if ans == INF:
    ans = 0
print(ans)
0