結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nisizawanisizawa
提出日時 2017-12-09 16:19:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,256 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 598 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 33,256 KB
最終ジャッジ日時 2024-04-26 00:17:22
合計ジャッジ時間 65,219 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,495 ms
33,256 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 1,250 ms
19,136 KB
testcase_03 AC 2,319 ms
26,552 KB
testcase_04 AC 2,801 ms
29,332 KB
testcase_05 AC 2,905 ms
29,332 KB
testcase_06 AC 2,590 ms
29,332 KB
testcase_07 AC 3,256 ms
32,508 KB
testcase_08 AC 3,114 ms
32,632 KB
testcase_09 AC 2,870 ms
32,636 KB
testcase_10 AC 2,886 ms
27,500 KB
testcase_11 AC 2,768 ms
28,516 KB
testcase_12 AC 2,311 ms
26,948 KB
testcase_13 AC 2,940 ms
31,132 KB
testcase_14 AC 2,991 ms
31,920 KB
testcase_15 AC 2,555 ms
29,376 KB
testcase_16 AC 2,438 ms
29,332 KB
testcase_17 AC 2,292 ms
29,448 KB
testcase_18 AC 2,327 ms
29,332 KB
testcase_19 AC 2,365 ms
32,636 KB
testcase_20 AC 2,263 ms
32,640 KB
testcase_21 AC 2,526 ms
32,504 KB
testcase_22 AC 2,141 ms
27,640 KB
testcase_23 AC 2,238 ms
28,536 KB
testcase_24 AC 28 ms
10,880 KB
testcase_25 AC 90 ms
11,136 KB
testcase_26 AC 51 ms
10,880 KB
testcase_27 AC 45 ms
10,880 KB
testcase_28 AC 543 ms
14,200 KB
testcase_29 AC 281 ms
12,388 KB
testcase_30 AC 96 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(60):
    mid = (low + high) / 2
    
    ct = 0
    for l in ls:
        ct += l // mid
        
    if ct >= k:
        low = mid
    else:
        high = mid

print('{:.20f}'.format(mid))
0