結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,649 ms
65,768 KB
testcase_01 AC 31 ms
10,496 KB
testcase_02 AC 1,587 ms
19,012 KB
testcase_03 AC 3,043 ms
26,336 KB
testcase_04 AC 3,677 ms
29,468 KB
testcase_05 AC 3,645 ms
29,460 KB
testcase_06 AC 3,403 ms
29,464 KB
testcase_07 AC 4,202 ms
32,772 KB
testcase_08 AC 4,193 ms
32,772 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
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 #

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

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