結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nisizawanisizawa
提出日時 2017-12-09 16:17:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 301 bytes
コンパイル時間 588 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 33,388 KB
最終ジャッジ日時 2024-04-26 00:20:16
合計ジャッジ時間 107,702 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,132 ms
33,388 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 1,995 ms
19,012 KB
testcase_03 AC 4,001 ms
26,552 KB
testcase_04 AC 4,716 ms
29,332 KB
testcase_05 AC 4,838 ms
29,464 KB
testcase_06 AC 4,377 ms
29,332 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 AC 4,246 ms
27,624 KB
testcase_11 AC 4,583 ms
28,516 KB
testcase_12 AC 3,968 ms
26,956 KB
testcase_13 AC 4,882 ms
31,136 KB
testcase_14 TLE -
testcase_15 AC 4,251 ms
29,372 KB
testcase_16 AC 3,962 ms
29,328 KB
testcase_17 AC 3,855 ms
29,324 KB
testcase_18 AC 3,858 ms
29,328 KB
testcase_19 AC 3,765 ms
32,764 KB
testcase_20 AC 3,781 ms
32,636 KB
testcase_21 AC 4,020 ms
32,636 KB
testcase_22 AC 3,541 ms
27,640 KB
testcase_23 AC 3,506 ms
28,536 KB
testcase_24 AC 29 ms
10,880 KB
testcase_25 AC 145 ms
11,264 KB
testcase_26 AC 65 ms
11,008 KB
testcase_27 AC 57 ms
10,880 KB
testcase_28 AC 897 ms
14,208 KB
testcase_29 AC 468 ms
12,516 KB
testcase_30 AC 145 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ls = list(map(int, input().split()))
k = int(input())

low = 0
high = max(ls)

for i in range(100):
    mid = (low + high) / 2
    
    ct = 0
    for l in ls:
        ct += l // mid
        
    if ct >= k:
        low = mid
    else:
        high = mid

print('{:.20f}'.format(mid))
0