結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー 1101 higoo1101 higoo
提出日時 2021-03-06 12:51:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 845 ms / 5,000 ms
コード長 273 bytes
コンパイル時間 482 ms
コンパイル使用メモリ 82,644 KB
実行使用メモリ 107,800 KB
最終ジャッジ日時 2024-04-26 01:19:16
合計ジャッジ時間 14,609 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 437 ms
102,320 KB
testcase_01 AC 41 ms
59,336 KB
testcase_02 AC 343 ms
87,196 KB
testcase_03 AC 621 ms
98,368 KB
testcase_04 AC 614 ms
106,816 KB
testcase_05 AC 611 ms
106,592 KB
testcase_06 AC 488 ms
106,720 KB
testcase_07 AC 842 ms
102,492 KB
testcase_08 AC 845 ms
102,204 KB
testcase_09 AC 680 ms
102,260 KB
testcase_10 AC 562 ms
102,988 KB
testcase_11 AC 585 ms
106,388 KB
testcase_12 AC 435 ms
102,864 KB
testcase_13 AC 771 ms
105,136 KB
testcase_14 AC 802 ms
107,800 KB
testcase_15 AC 579 ms
104,472 KB
testcase_16 AC 303 ms
106,760 KB
testcase_17 AC 276 ms
106,620 KB
testcase_18 AC 314 ms
106,488 KB
testcase_19 AC 295 ms
102,596 KB
testcase_20 AC 337 ms
102,348 KB
testcase_21 AC 337 ms
102,332 KB
testcase_22 AC 300 ms
103,376 KB
testcase_23 AC 300 ms
106,284 KB
testcase_24 AC 36 ms
52,328 KB
testcase_25 AC 65 ms
65,320 KB
testcase_26 AC 53 ms
63,256 KB
testcase_27 AC 50 ms
61,716 KB
testcase_28 AC 183 ms
80,104 KB
testcase_29 AC 119 ms
75,344 KB
testcase_30 AC 66 ms
65,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(map(int,input().split()))
K = int(input())
l = 0
r = sum(L)/K
while r-l >10**(-10) and (r-l)/r > 10**(-10):
    mid = (l+r)/2
    ans = 0
    for num in L:
        ans += num//mid
    if ans >= K:
        l = mid
    else:
        r = mid
print(l)
0