結果

問題 No.716 距離
ユーザー ThetaTheta
提出日時 2022-10-18 15:12:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 29,788 KB
最終ジャッジ日時 2023-09-11 08:37:56
合計ジャッジ時間 8,628 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
29,596 KB
testcase_01 AC 129 ms
29,564 KB
testcase_02 AC 129 ms
29,724 KB
testcase_03 AC 127 ms
29,676 KB
testcase_04 AC 130 ms
29,656 KB
testcase_05 AC 128 ms
29,508 KB
testcase_06 AC 128 ms
29,712 KB
testcase_07 AC 130 ms
29,576 KB
testcase_08 AC 130 ms
29,772 KB
testcase_09 AC 128 ms
29,544 KB
testcase_10 AC 131 ms
29,576 KB
testcase_11 AC 128 ms
29,436 KB
testcase_12 AC 130 ms
29,708 KB
testcase_13 AC 131 ms
29,616 KB
testcase_14 AC 130 ms
29,620 KB
testcase_15 AC 129 ms
29,648 KB
testcase_16 AC 128 ms
29,752 KB
testcase_17 AC 132 ms
29,788 KB
testcase_18 AC 128 ms
29,692 KB
testcase_19 AC 129 ms
29,572 KB
testcase_20 AC 128 ms
29,572 KB
testcase_21 AC 129 ms
29,640 KB
testcase_22 AC 128 ms
29,612 KB
testcase_23 AC 132 ms
29,636 KB
testcase_24 AC 128 ms
29,656 KB
testcase_25 AC 127 ms
29,664 KB
testcase_26 AC 126 ms
29,624 KB
testcase_27 AC 128 ms
29,644 KB
testcase_28 AC 128 ms
29,716 KB
testcase_29 AC 128 ms
29,668 KB
testcase_30 AC 128 ms
29,624 KB
testcase_31 AC 135 ms
29,684 KB
testcase_32 AC 132 ms
29,692 KB
testcase_33 AC 132 ms
29,592 KB
testcase_34 AC 128 ms
29,724 KB
testcase_35 AC 129 ms
29,712 KB
testcase_36 AC 132 ms
29,704 KB
testcase_37 AC 128 ms
29,580 KB
testcase_38 AC 132 ms
29,604 KB
testcase_39 AC 130 ms
29,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    N = int(input())
    a = np.array(list(map(int, input().split())))

    a_diff = np.diff(a)
    print(min(a_diff))
    print(a[-1] - a[0])


if __name__ == "__main__":
    main()
0