結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ckawatakckawatak
提出日時 2017-09-30 18:03:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,632 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 108,456 KB
最終ジャッジ日時 2024-04-26 00:12:58
合計ジャッジ時間 25,852 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 837 ms
102,528 KB
testcase_01 AC 45 ms
58,496 KB
testcase_02 AC 682 ms
87,680 KB
testcase_03 AC 1,196 ms
99,328 KB
testcase_04 AC 1,168 ms
108,160 KB
testcase_05 AC 1,161 ms
108,416 KB
testcase_06 AC 875 ms
108,164 KB
testcase_07 AC 1,622 ms
102,144 KB
testcase_08 AC 1,632 ms
102,144 KB
testcase_09 AC 937 ms
101,888 KB
testcase_10 AC 1,071 ms
104,064 KB
testcase_11 AC 1,111 ms
107,520 KB
testcase_12 AC 780 ms
104,064 KB
testcase_13 AC 1,498 ms
106,112 KB
testcase_14 AC 1,580 ms
107,740 KB
testcase_15 AC 839 ms
105,472 KB
testcase_16 AC 691 ms
108,032 KB
testcase_17 AC 665 ms
108,456 KB
testcase_18 AC 653 ms
108,100 KB
testcase_19 AC 658 ms
101,888 KB
testcase_20 AC 641 ms
102,272 KB
testcase_21 AC 647 ms
102,124 KB
testcase_22 AC 596 ms
104,064 KB
testcase_23 AC 619 ms
107,680 KB
testcase_24 AC 37 ms
51,968 KB
testcase_25 AC 93 ms
69,504 KB
testcase_26 AC 64 ms
63,872 KB
testcase_27 AC 56 ms
62,080 KB
testcase_28 AC 351 ms
79,616 KB
testcase_29 AC 217 ms
76,836 KB
testcase_30 AC 95 ms
70,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
LENGTHS = list(map(int, input().split()))
K = int(input())

LENGTHS.sort()
l = 0
r = LENGTHS[-1]
for i in range(100):
    m = (l + r)/2
    counts = 0
    for length in LENGTHS:
        counts += length//m
    if K <= counts:
        l = m
    else:
        r = m
print("%.15f" % l)
0