結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー H3PO4H3PO4
提出日時 2020-04-23 11:59:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 62,704 KB
最終ジャッジ日時 2024-04-21 10:59:17
合計ジャッジ時間 29,599 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 842 ms
62,696 KB
testcase_01 AC 458 ms
43,916 KB
testcase_02 AC 848 ms
49,172 KB
testcase_03 AC 1,212 ms
56,696 KB
testcase_04 AC 1,242 ms
58,064 KB
testcase_05 AC 1,215 ms
58,072 KB
testcase_06 AC 1,060 ms
58,312 KB
testcase_07 AC 1,472 ms
62,704 KB
testcase_08 AC 1,473 ms
62,436 KB
testcase_09 AC 1,260 ms
62,312 KB
testcase_10 AC 1,159 ms
57,092 KB
testcase_11 AC 1,211 ms
57,328 KB
testcase_12 AC 989 ms
56,260 KB
testcase_13 AC 1,407 ms
60,748 KB
testcase_14 AC 1,428 ms
61,584 KB
testcase_15 AC 1,148 ms
59,172 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
L = np.array(tuple(map(int, input().split())))
K = int(input())
l, r = 0, 10 ** 9

while r - l > 10 ** -9:
    m = (l + r) / 2
    if (L // m).astype(int).sum() < K:
        r = m
    else:
        l = m
print(l)
0