結果

問題 No.135 とりあえず1次元の問題
ユーザー akitsugu777akitsugu777
提出日時 2019-06-21 15:21:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 179 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 21,056 KB
最終ジャッジ日時 2023-08-26 08:53:45
合計ジャッジ時間 1,996 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
21,056 KB
testcase_01 AC 14 ms
7,788 KB
testcase_02 AC 14 ms
7,964 KB
testcase_03 AC 14 ms
7,712 KB
testcase_04 AC 14 ms
7,780 KB
testcase_05 AC 14 ms
7,844 KB
testcase_06 AC 13 ms
7,840 KB
testcase_07 AC 13 ms
7,792 KB
testcase_08 AC 14 ms
7,924 KB
testcase_09 AC 16 ms
7,780 KB
testcase_10 AC 15 ms
7,900 KB
testcase_11 AC 14 ms
7,888 KB
testcase_12 AC 14 ms
7,760 KB
testcase_13 AC 16 ms
7,760 KB
testcase_14 AC 16 ms
7,760 KB
testcase_15 AC 15 ms
7,916 KB
testcase_16 AC 16 ms
7,748 KB
testcase_17 AC 15 ms
7,708 KB
testcase_18 AC 15 ms
7,756 KB
testcase_19 AC 16 ms
7,780 KB
testcase_20 AC 16 ms
7,760 KB
testcase_21 AC 61 ms
18,864 KB
testcase_22 AC 90 ms
20,924 KB
evil01.txt AC 70 ms
20,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if len(set(x)) == 1:
    print(0)
else:
    l = [x[i+1] - x[i] for i in range(n-1) if x[i+1] - x[i] != 0]
    print(min(l))
0