結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー mmd6688mmd6688
提出日時 2023-03-07 08:44:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 264 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 197,708 KB
最終ジャッジ日時 2023-10-18 05:25:43
合計ジャッジ時間 7,964 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 259 ms
192,276 KB
testcase_01 AC 41 ms
59,388 KB
testcase_02 AC 126 ms
114,804 KB
testcase_03 AC 196 ms
163,200 KB
testcase_04 AC 250 ms
197,700 KB
testcase_05 AC 253 ms
197,700 KB
testcase_06 AC 251 ms
197,704 KB
testcase_07 AC 264 ms
192,208 KB
testcase_08 AC 262 ms
192,208 KB
testcase_09 AC 261 ms
192,212 KB
testcase_10 AC 230 ms
183,660 KB
testcase_11 AC 242 ms
192,348 KB
testcase_12 AC 222 ms
180,112 KB
testcase_13 AC 234 ms
164,704 KB
testcase_14 AC 243 ms
168,012 KB
testcase_15 AC 226 ms
142,888 KB
testcase_16 AC 251 ms
197,708 KB
testcase_17 AC 249 ms
197,696 KB
testcase_18 AC 249 ms
197,700 KB
testcase_19 AC 262 ms
192,216 KB
testcase_20 AC 262 ms
192,208 KB
testcase_21 AC 259 ms
192,208 KB
testcase_22 AC 226 ms
183,628 KB
testcase_23 AC 241 ms
192,372 KB
testcase_24 AC 38 ms
53,308 KB
testcase_25 AC 50 ms
64,028 KB
testcase_26 AC 49 ms
61,980 KB
testcase_27 AC 46 ms
59,400 KB
testcase_28 AC 80 ms
84,548 KB
testcase_29 AC 60 ms
72,792 KB
testcase_30 AC 50 ms
64,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

low = 0
high = max(L)

for _ in range(60):
    mid = (low + high) / 2
    if sum([int(i/mid) for i in L]) < K:
        high = mid
    else:
        low = mid

print(low)
0