結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー rkyiolklorkyiolklo
提出日時 2020-04-20 22:30:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,161 ms / 5,000 ms
コード長 257 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 33,180 KB
最終ジャッジ日時 2024-04-26 01:05:08
合計ジャッジ時間 65,695 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,479 ms
33,180 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 AC 1,270 ms
19,016 KB
testcase_03 AC 2,354 ms
26,552 KB
testcase_04 AC 2,836 ms
29,336 KB
testcase_05 AC 2,867 ms
29,336 KB
testcase_06 AC 2,771 ms
29,332 KB
testcase_07 AC 3,134 ms
32,764 KB
testcase_08 AC 3,161 ms
32,640 KB
testcase_09 AC 2,915 ms
32,640 KB
testcase_10 AC 2,642 ms
27,624 KB
testcase_11 AC 2,786 ms
28,520 KB
testcase_12 AC 2,274 ms
26,948 KB
testcase_13 AC 2,957 ms
31,132 KB
testcase_14 AC 3,044 ms
31,920 KB
testcase_15 AC 2,531 ms
29,376 KB
testcase_16 AC 2,406 ms
29,328 KB
testcase_17 AC 2,430 ms
29,316 KB
testcase_18 AC 2,665 ms
29,328 KB
testcase_19 AC 2,410 ms
32,608 KB
testcase_20 AC 2,288 ms
32,636 KB
testcase_21 AC 2,293 ms
32,632 KB
testcase_22 AC 2,230 ms
27,640 KB
testcase_23 AC 2,245 ms
28,536 KB
testcase_24 AC 29 ms
10,752 KB
testcase_25 AC 95 ms
11,264 KB
testcase_26 AC 54 ms
10,880 KB
testcase_27 AC 45 ms
10,880 KB
testcase_28 AC 555 ms
14,204 KB
testcase_29 AC 294 ms
12,388 KB
testcase_30 AC 99 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(61):
    mid= (high+low)/2
    ct=0
    for l in ls:
        ct+=l//mid 
    if ct>=k:
        low=mid 
    else:
        high=mid
print('{:.20f}'.format(mid))
0