結果

問題 No.135 とりあえず1次元の問題
ユーザー kohei2019kohei2019
提出日時 2021-08-02 22:34:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 198 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 86,572 KB
実行使用メモリ 100,464 KB
最終ジャッジ日時 2023-10-14 20:57:58
合計ジャッジ時間 4,251 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
100,420 KB
testcase_01 AC 71 ms
71,164 KB
testcase_02 AC 70 ms
71,212 KB
testcase_03 AC 71 ms
71,076 KB
testcase_04 AC 73 ms
71,260 KB
testcase_05 AC 71 ms
71,308 KB
testcase_06 AC 71 ms
71,260 KB
testcase_07 AC 69 ms
71,316 KB
testcase_08 AC 72 ms
71,188 KB
testcase_09 AC 69 ms
70,984 KB
testcase_10 AC 70 ms
71,284 KB
testcase_11 AC 68 ms
71,464 KB
testcase_12 AC 70 ms
71,284 KB
testcase_13 AC 72 ms
71,260 KB
testcase_14 AC 69 ms
71,236 KB
testcase_15 AC 71 ms
71,380 KB
testcase_16 AC 71 ms
71,180 KB
testcase_17 AC 67 ms
71,168 KB
testcase_18 AC 67 ms
71,172 KB
testcase_19 AC 66 ms
71,296 KB
testcase_20 AC 66 ms
71,260 KB
testcase_21 AC 84 ms
84,076 KB
testcase_22 AC 116 ms
100,464 KB
evil01.txt AC 112 ms
100,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsX = list(set(map(int,input().split())))
if len(lsX) == 1:
    print(0)
    exit()
lsX.sort()
ans = 10**10
for i in range(len(lsX)-1):
    ans = min(ans,lsX[i+1]-lsX[i])
print(ans)
0