結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nebukuro09nebukuro09
提出日時 2016-10-04 16:45:17
言語 Python2
(2.7.18)
結果
AC  
実行時間 4,434 ms / 5,000 ms
コード長 288 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 7,168 KB
実行使用メモリ 23,868 KB
最終ジャッジ日時 2024-04-25 23:48:08
合計ジャッジ時間 98,774 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,208 ms
23,736 KB
testcase_01 AC 11 ms
6,944 KB
testcase_02 AC 1,601 ms
12,868 KB
testcase_03 AC 3,077 ms
18,744 KB
testcase_04 AC 4,405 ms
22,032 KB
testcase_05 AC 4,434 ms
22,024 KB
testcase_06 AC 4,419 ms
22,028 KB
testcase_07 AC 4,264 ms
23,740 KB
testcase_08 AC 4,289 ms
23,608 KB
testcase_09 AC 4,345 ms
23,868 KB
testcase_10 AC 4,027 ms
20,704 KB
testcase_11 AC 4,177 ms
21,252 KB
testcase_12 AC 3,775 ms
19,960 KB
testcase_13 AC 3,848 ms
22,280 KB
testcase_14 AC 4,028 ms
22,936 KB
testcase_15 AC 3,656 ms
21,184 KB
testcase_16 AC 4,227 ms
22,060 KB
testcase_17 AC 4,223 ms
22,012 KB
testcase_18 AC 4,137 ms
22,024 KB
testcase_19 AC 4,146 ms
23,740 KB
testcase_20 AC 4,177 ms
23,784 KB
testcase_21 AC 4,170 ms
23,740 KB
testcase_22 AC 3,748 ms
20,588 KB
testcase_23 AC 4,067 ms
21,384 KB
testcase_24 AC 10 ms
6,944 KB
testcase_25 AC 93 ms
6,944 KB
testcase_26 AC 41 ms
6,940 KB
testcase_27 AC 31 ms
6,944 KB
testcase_28 AC 696 ms
8,924 KB
testcase_29 AC 349 ms
7,680 KB
testcase_30 AC 98 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
L = map(int, raw_input().split())
K = int(raw_input())
EPS = 10**(-9)

high = float(max(L))
low = 0.0
for i in xrange(100):
    middle = (high+low)/2.0
    if sum(int(x/middle) for x in L) >= K:
        low = middle
    else:
        high = middle
print '%.09f'%high
0