結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nisizawanisizawa
提出日時 2017-12-09 16:32:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 300 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 30,660 KB
最終ジャッジ日時 2023-09-08 18:31:04
合計ジャッジ時間 55,106 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,123 ms
30,660 KB
testcase_01 WA -
testcase_02 AC 1,033 ms
16,336 KB
testcase_03 AC 1,947 ms
23,888 KB
testcase_04 AC 2,376 ms
28,848 KB
testcase_05 AC 2,351 ms
28,784 KB
testcase_06 AC 2,130 ms
28,776 KB
testcase_07 AC 2,687 ms
29,980 KB
testcase_08 AC 2,746 ms
29,892 KB
testcase_09 AC 2,418 ms
30,008 KB
testcase_10 AC 2,070 ms
28,272 KB
testcase_11 AC 2,223 ms
28,108 KB
testcase_12 AC 1,917 ms
25,360 KB
testcase_13 AC 2,500 ms
28,380 KB
testcase_14 AC 2,566 ms
28,920 KB
testcase_15 AC 2,065 ms
26,716 KB
testcase_16 AC 2,111 ms
28,876 KB
testcase_17 AC 1,927 ms
28,860 KB
testcase_18 AC 1,885 ms
28,864 KB
testcase_19 AC 1,883 ms
29,956 KB
testcase_20 AC 1,855 ms
29,844 KB
testcase_21 AC 1,857 ms
29,980 KB
testcase_22 AC 1,675 ms
28,224 KB
testcase_23 AC 1,743 ms
28,028 KB
testcase_24 AC 15 ms
7,944 KB
testcase_25 AC 71 ms
8,524 KB
testcase_26 AC 37 ms
8,252 KB
testcase_27 AC 30 ms
7,896 KB
testcase_28 AC 486 ms
11,460 KB
testcase_29 AC 237 ms
9,768 KB
testcase_30 AC 73 ms
8,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ls = list(map(int, input().split()))
k = int(input())

low = 0
high = max(ls)

for i in range(55):
    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