結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー yaoshimaxyaoshimax
提出日時 2015-02-25 23:33:44
言語 Python2
(2.7.18)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 401 bytes
コンパイル時間 506 ms
コンパイル使用メモリ 6,728 KB
実行使用メモリ 23,288 KB
最終ジャッジ日時 2023-09-06 04:44:25
合計ジャッジ時間 29,515 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
23,284 KB
testcase_01 AC 12 ms
5,988 KB
testcase_02 AC 2,071 ms
12,188 KB
testcase_03 AC 4,123 ms
18,444 KB
testcase_04 AC 3,405 ms
21,592 KB
testcase_05 AC 3,372 ms
21,520 KB
testcase_06 AC 2,217 ms
21,448 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 AC 2,864 ms
20,148 KB
testcase_11 AC 3,360 ms
20,732 KB
testcase_12 AC 1,915 ms
19,456 KB
testcase_13 TLE -
testcase_14 TLE -
testcase_15 AC 4,302 ms
20,748 KB
testcase_16 AC 682 ms
21,648 KB
testcase_17 AC 334 ms
21,620 KB
testcase_18 AC 193 ms
21,564 KB
testcase_19 AC 369 ms
23,264 KB
testcase_20 AC 204 ms
23,064 KB
testcase_21 AC 207 ms
23,244 KB
testcase_22 AC 175 ms
19,976 KB
testcase_23 AC 183 ms
20,848 KB
testcase_24 AC 11 ms
6,088 KB
testcase_25 AC 120 ms
6,292 KB
testcase_26 AC 50 ms
5,972 KB
testcase_27 AC 38 ms
5,928 KB
testcase_28 AC 875 ms
8,608 KB
testcase_29 AC 442 ms
7,096 KB
testcase_30 AC 123 ms
6,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
L=map(int,raw_input().split())
K=int(raw_input())
left=0.000000001
right=1000000001
L.sort()
L.reverse()
while max(left*1.000000001,left+0.000000001)<right:
    mid=(left+right)/2
    cnt=0
    for l in L:
        cnt+=int(l/mid)
        if cnt>=K:
            break
        if int(l/mid)==0:
            break
    if cnt>=K:
        left=mid
    else:
        right=mid
print left
0