結果

問題 No.716 距離
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-09-25 15:03:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 334 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 11,740 KB
実行使用メモリ 14,316 KB
最終ジャッジ日時 2023-10-22 05:14:57
合計ジャッジ時間 5,778 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 29 ms
10,068 KB
testcase_08 AC 29 ms
10,068 KB
testcase_09 AC 29 ms
10,068 KB
testcase_10 AC 112 ms
12,840 KB
testcase_11 AC 54 ms
10,832 KB
testcase_12 AC 142 ms
13,780 KB
testcase_13 AC 103 ms
12,508 KB
testcase_14 AC 28 ms
10,068 KB
testcase_15 AC 128 ms
13,376 KB
testcase_16 AC 69 ms
11,400 KB
testcase_17 AC 136 ms
13,668 KB
testcase_18 AC 30 ms
10,080 KB
testcase_19 AC 60 ms
11,004 KB
testcase_20 AC 28 ms
10,068 KB
testcase_21 AC 31 ms
10,088 KB
testcase_22 AC 42 ms
10,424 KB
testcase_23 AC 30 ms
10,080 KB
testcase_24 AC 113 ms
12,828 KB
testcase_25 AC 55 ms
10,852 KB
testcase_26 AC 77 ms
11,684 KB
testcase_27 AC 92 ms
12,172 KB
testcase_28 AC 31 ms
10,076 KB
testcase_29 AC 81 ms
11,776 KB
testcase_30 AC 80 ms
11,692 KB
testcase_31 AC 106 ms
12,568 KB
testcase_32 AC 91 ms
12,100 KB
testcase_33 AC 85 ms
11,892 KB
testcase_34 AC 69 ms
11,320 KB
testcase_35 AC 29 ms
10,068 KB
testcase_36 AC 37 ms
10,264 KB
testcase_37 AC 30 ms
10,068 KB
testcase_38 AC 49 ms
10,668 KB
testcase_39 AC 84 ms
11,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# No.716 距離
def select_distance_min(n, a):
    if len(a) == 1:
        return n
    
    for i in a[1:]:
        n = min(i - a[0], n)
    return select_distance_min(n, a[1:])

n = int(input())
a = [int(i) for i in input().split()]

distance_max = a[n - 1] - a[0]

print(select_distance_min(distance_max, a))
print(distance_max)


0