結果

問題 No.135 とりあえず1次元の問題
ユーザー Konton7Konton7
提出日時 2020-03-08 14:24:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 206 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,852 KB
最終ジャッジ日時 2024-04-24 18:29:03
合計ジャッジ時間 2,000 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
20,852 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 RE -
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 25 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 25 ms
10,752 KB
testcase_10 AC 26 ms
10,752 KB
testcase_11 AC 25 ms
10,752 KB
testcase_12 AC 25 ms
10,752 KB
testcase_13 AC 24 ms
10,752 KB
testcase_14 AC 24 ms
10,880 KB
testcase_15 AC 28 ms
10,880 KB
testcase_16 AC 28 ms
10,752 KB
testcase_17 AC 26 ms
10,752 KB
testcase_18 AC 26 ms
10,752 KB
testcase_19 AC 27 ms
10,752 KB
testcase_20 AC 25 ms
10,752 KB
testcase_21 AC 74 ms
20,080 KB
testcase_22 AC 110 ms
20,848 KB
evil01.txt AC 90 ms
20,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
num = [ int(v) for v in input().split() ]
num.sort()
num2 = [ num[i+1] - num[i] for i in range(n - 1) if num[i+1] != num[i]  ]
    

if len(num) > 0:
    print(min(num2))
else:
    print(0)
0