結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー lloyzlloyz
提出日時 2022-01-16 16:30:54
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 337 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 110,592 KB
最終ジャッジ日時 2024-05-02 18:16:16
合計ジャッジ時間 10,902 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 226 ms
102,656 KB
testcase_01 AC 47 ms
57,856 KB
testcase_02 AC 120 ms
79,360 KB
testcase_03 AC 178 ms
95,872 KB
testcase_04 AC 227 ms
104,064 KB
testcase_05 AC 227 ms
104,192 KB
testcase_06 AC 227 ms
103,808 KB
testcase_07 AC 239 ms
102,144 KB
testcase_08 AC 239 ms
101,888 KB
testcase_09 AC 239 ms
102,272 KB
testcase_10 AC 208 ms
99,456 KB
testcase_11 AC 218 ms
103,040 KB
testcase_12 AC 206 ms
99,200 KB
testcase_13 AC 216 ms
104,832 KB
testcase_14 AC 227 ms
107,392 KB
testcase_15 AC 208 ms
104,448 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 #

from math import floor

n = int(input())
L = list(map(int, input().split()))
k = int(input())
eps = 1e-9

left = 0
right = max(L) + eps
while right - left > eps:
    mid = (left + right) / 2
    cnt = 0
    for i in range(n):
        cnt += floor(L[i] / mid)
    if cnt >= k:
        left = mid
    else:
        right = mid
print(left)
0