結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nebukuro09nebukuro09
提出日時 2017-01-17 13:24:37
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 331 ms / 5,000 ms
コード長 288 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 77,116 KB
実行使用メモリ 103,384 KB
最終ジャッジ日時 2024-04-25 23:48:31
合計ジャッジ時間 9,429 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
103,256 KB
testcase_01 AC 77 ms
77,344 KB
testcase_02 AC 174 ms
86,956 KB
testcase_03 AC 255 ms
95,764 KB
testcase_04 AC 316 ms
101,116 KB
testcase_05 AC 315 ms
100,736 KB
testcase_06 AC 317 ms
100,732 KB
testcase_07 AC 317 ms
103,268 KB
testcase_08 AC 317 ms
103,128 KB
testcase_09 AC 322 ms
102,744 KB
testcase_10 AC 297 ms
98,116 KB
testcase_11 AC 320 ms
100,204 KB
testcase_12 AC 294 ms
98,108 KB
testcase_13 AC 305 ms
100,348 KB
testcase_14 AC 312 ms
102,300 KB
testcase_15 AC 286 ms
99,624 KB
testcase_16 AC 331 ms
101,220 KB
testcase_17 AC 323 ms
100,860 KB
testcase_18 AC 325 ms
101,124 KB
testcase_19 AC 321 ms
103,012 KB
testcase_20 AC 316 ms
102,996 KB
testcase_21 AC 318 ms
103,384 KB
testcase_22 AC 295 ms
98,240 KB
testcase_23 AC 312 ms
100,480 KB
testcase_24 AC 74 ms
75,528 KB
testcase_25 AC 89 ms
77,972 KB
testcase_26 AC 88 ms
78,004 KB
testcase_27 AC 84 ms
77,764 KB
testcase_28 AC 123 ms
80,936 KB
testcase_29 AC 102 ms
79,672 KB
testcase_30 AC 89 ms
77,988 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