結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー gigurururugigurururu
提出日時 2014-11-25 13:16:28
言語 Python2
(2.7.18)
結果
AC  
実行時間 2,426 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 23,796 KB
最終ジャッジ日時 2024-04-25 23:13:18
合計ジャッジ時間 42,438 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,261 ms
23,796 KB
testcase_01 AC 12 ms
6,940 KB
testcase_02 AC 900 ms
12,928 KB
testcase_03 AC 1,753 ms
18,932 KB
testcase_04 AC 2,253 ms
22,220 KB
testcase_05 AC 2,242 ms
22,336 KB
testcase_06 AC 1,859 ms
22,088 KB
testcase_07 AC 2,426 ms
23,668 KB
testcase_08 AC 2,423 ms
23,796 KB
testcase_09 AC 1,922 ms
23,796 KB
testcase_10 AC 2,038 ms
20,640 KB
testcase_11 AC 2,104 ms
21,440 KB
testcase_12 AC 1,618 ms
20,024 KB
testcase_13 AC 2,224 ms
22,340 KB
testcase_14 AC 2,354 ms
23,000 KB
testcase_15 AC 1,713 ms
21,244 KB
testcase_16 AC 1,317 ms
22,212 KB
testcase_17 AC 1,241 ms
22,200 KB
testcase_18 AC 1,159 ms
22,208 KB
testcase_19 AC 1,209 ms
23,668 KB
testcase_20 AC 1,163 ms
23,796 KB
testcase_21 AC 1,178 ms
23,668 KB
testcase_22 AC 1,064 ms
20,648 KB
testcase_23 AC 1,097 ms
21,440 KB
testcase_24 AC 10 ms
6,940 KB
testcase_25 AC 62 ms
6,940 KB
testcase_26 AC 30 ms
6,944 KB
testcase_27 AC 23 ms
6,944 KB
testcase_28 AC 404 ms
9,108 KB
testcase_29 AC 220 ms
7,808 KB
testcase_30 AC 68 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=input()
la=map(int,raw_input().split())
k=input()

eps=1e-9
l=0.0
r=1e9

while all([d>eps for d in [abs(l-r),abs(l-r)/r]]):
    c=(l+r)/2
    if sum([i//c for i in la])>=k:
        l=c
    else:
        r=c

print (l+r)/2
0