結果

問題 No.716 距離
ユーザー woodwood
提出日時 2018-11-08 13:06:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 391 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 49,920 KB
最終ジャッジ日時 2024-04-30 22:39:08
合計ジャッジ時間 8,325 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 372 ms
49,920 KB
testcase_01 AC 370 ms
49,920 KB
testcase_02 AC 378 ms
49,920 KB
testcase_03 AC 391 ms
49,920 KB
testcase_04 AC 387 ms
49,920 KB
testcase_05 AC 383 ms
49,920 KB
testcase_06 AC 385 ms
49,920 KB
testcase_07 AC 27 ms
10,624 KB
testcase_08 AC 26 ms
10,624 KB
testcase_09 AC 24 ms
10,624 KB
testcase_10 AC 272 ms
37,376 KB
testcase_11 AC 96 ms
18,176 KB
testcase_12 AC 340 ms
46,208 KB
testcase_13 AC 235 ms
34,176 KB
testcase_14 AC 26 ms
10,624 KB
testcase_15 AC 301 ms
42,368 KB
testcase_16 AC 132 ms
23,424 KB
testcase_17 AC 344 ms
45,184 KB
testcase_18 AC 31 ms
11,136 KB
testcase_19 AC 108 ms
19,712 KB
testcase_20 AC 26 ms
10,752 KB
testcase_21 AC 32 ms
11,520 KB
testcase_22 AC 57 ms
14,464 KB
testcase_23 AC 30 ms
11,264 KB
testcase_24 AC 246 ms
37,120 KB
testcase_25 AC 93 ms
18,304 KB
testcase_26 AC 155 ms
26,112 KB
testcase_27 AC 193 ms
30,848 KB
testcase_28 AC 30 ms
11,136 KB
testcase_29 AC 179 ms
27,008 KB
testcase_30 AC 158 ms
26,240 KB
testcase_31 AC 231 ms
34,688 KB
testcase_32 AC 193 ms
30,080 KB
testcase_33 AC 175 ms
28,160 KB
testcase_34 AC 133 ms
22,784 KB
testcase_35 AC 27 ms
10,880 KB
testcase_36 AC 44 ms
13,056 KB
testcase_37 AC 26 ms
10,880 KB
testcase_38 AC 76 ms
16,640 KB
testcase_39 AC 182 ms
27,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

a = list(map(int, input().split()))

d = []
for q,i in enumerate(a):
    for w,j in enumerate(a):
        if q == w:
            continue
        d.append(abs(i-j))

print(min(d))

print(abs(max(a)-min(a)))
0