結果

問題 No.135 とりあえず1次元の問題
ユーザー matriematrie
提出日時 2020-11-26 01:13:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 211 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 42,612 KB
最終ジャッジ日時 2023-10-01 02:05:22
合計ジャッジ時間 5,019 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 193 ms
42,280 KB
testcase_01 AC 133 ms
29,540 KB
testcase_02 AC 133 ms
29,508 KB
testcase_03 AC 129 ms
29,504 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 131 ms
29,680 KB
testcase_13 AC 133 ms
29,588 KB
testcase_14 AC 130 ms
29,748 KB
testcase_15 AC 130 ms
29,756 KB
testcase_16 RE -
testcase_17 AC 129 ms
29,608 KB
testcase_18 AC 132 ms
29,712 KB
testcase_19 AC 130 ms
29,704 KB
testcase_20 AC 133 ms
29,592 KB
testcase_21 AC 165 ms
40,948 KB
testcase_22 RE -
evil01.txt AC 184 ms
42,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
N = int(input())
l = list(set(list(map(int, input().split()))))
l.sort()

if len(l)==1: print(0)

elif len(l)==2: print(l[1]-l[0])

else:
	a = np.array(l)
	d = a[1:N] - a[0:N-1]
	print(min(d))
0