結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-26 15:20:48
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 312 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 81,836 KB
実行使用メモリ 105,940 KB
最終ジャッジ日時 2023-10-24 23:19:58
合計ジャッジ時間 15,743 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 553 ms
101,904 KB
testcase_01 AC 40 ms
59,956 KB
testcase_02 AC 552 ms
81,664 KB
testcase_03 AC 1,039 ms
97,596 KB
testcase_04 AC 991 ms
105,940 KB
testcase_05 AC 984 ms
105,940 KB
testcase_06 AC 826 ms
105,676 KB
testcase_07 AC 1,431 ms
101,560 KB
testcase_08 AC 1,434 ms
101,560 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 #

eps = 1e-10
N = int(input())
L = list(map(int, input().split()))
K = int(input())


def C(x):
    cnt = 0
    for a in L:
        cnt += int(a // x + eps)
    return cnt >= K


l = 0
r = 10**9
while r - l > eps:
    m = (r + l) * 0.5
    if C(m):
        l = m
    else:
        r = m

print("{:.10f}".format(r))
0