結果

問題 No.135 とりあえず1次元の問題
ユーザー 👑 matsu7874matsu7874
提出日時 2015-01-25 23:48:49
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 88 ms / 5,000 ms
コード長 172 bytes
コンパイル時間 96 ms
使用メモリ 21,584 KB
最終ジャッジ日時 2023-01-17 23:02:12
合計ジャッジ時間 2,062 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 84 ms
21,584 KB
evil01.txt AC 78 ms
20,616 KB
testcase_02 AC 15 ms
7,692 KB
testcase_03 AC 15 ms
7,668 KB
testcase_04 AC 15 ms
7,740 KB
testcase_05 AC 15 ms
7,660 KB
testcase_06 AC 15 ms
7,632 KB
testcase_07 AC 16 ms
7,688 KB
testcase_08 AC 15 ms
7,580 KB
testcase_09 AC 15 ms
7,696 KB
testcase_10 AC 16 ms
7,512 KB
testcase_11 AC 15 ms
7,708 KB
testcase_12 AC 15 ms
7,708 KB
testcase_13 AC 15 ms
7,604 KB
testcase_14 AC 14 ms
7,680 KB
testcase_15 AC 16 ms
7,964 KB
testcase_16 AC 16 ms
7,612 KB
testcase_17 AC 15 ms
7,964 KB
testcase_18 AC 15 ms
7,904 KB
testcase_19 AC 16 ms
7,552 KB
testcase_20 AC 16 ms
7,824 KB
testcase_21 AC 16 ms
7,724 KB
testcase_22 AC 52 ms
18,592 KB
testcase_23 AC 88 ms
20,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = [int(x) for x in input().split()]
X = list(set(X))
X.sort()
N = len(X)
if N == 1:
    print(0)
    exit()
print(min([X[i+1]-X[i] for i in range(N-1)]))
0