結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,975 ms
30,736 KB
testcase_01 WA -
testcase_02 AC 988 ms
16,248 KB
testcase_03 AC 1,920 ms
23,836 KB
testcase_04 AC 2,205 ms
28,816 KB
testcase_05 AC 2,200 ms
28,676 KB
testcase_06 AC 2,115 ms
28,824 KB
testcase_07 AC 2,717 ms
29,984 KB
testcase_08 AC 2,581 ms
29,948 KB
testcase_09 AC 2,394 ms
29,960 KB
testcase_10 AC 2,001 ms
28,248 KB
testcase_11 AC 2,143 ms
28,044 KB
testcase_12 AC 1,796 ms
25,296 KB
testcase_13 AC 2,400 ms
28,436 KB
testcase_14 AC 2,577 ms
28,888 KB
testcase_15 AC 1,994 ms
26,708 KB
testcase_16 AC 1,845 ms
28,860 KB
testcase_17 AC 1,816 ms
28,784 KB
testcase_18 AC 1,836 ms
28,796 KB
testcase_19 AC 1,814 ms
29,848 KB
testcase_20 AC 1,805 ms
29,964 KB
testcase_21 AC 1,812 ms
29,924 KB
testcase_22 AC 1,618 ms
28,192 KB
testcase_23 AC 1,697 ms
28,124 KB
testcase_24 AC 15 ms
7,920 KB
testcase_25 AC 69 ms
8,604 KB
testcase_26 AC 35 ms
8,332 KB
testcase_27 AC 29 ms
7,868 KB
testcase_28 AC 438 ms
11,468 KB
testcase_29 AC 237 ms
9,888 KB
testcase_30 AC 73 ms
8,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

low = 0
high = max(ls)

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