結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー rlangevinrlangevin
提出日時 2023-08-24 12:21:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 561 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 564 ms
コンパイル使用メモリ 87,592 KB
実行使用メモリ 108,044 KB
最終ジャッジ日時 2023-08-24 12:21:28
合計ジャッジ時間 17,288 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 529 ms
100,244 KB
testcase_01 AC 70 ms
76,304 KB
testcase_02 AC 242 ms
87,948 KB
testcase_03 AC 408 ms
99,868 KB
testcase_04 AC 523 ms
107,768 KB
testcase_05 AC 547 ms
108,044 KB
testcase_06 AC 523 ms
107,852 KB
testcase_07 AC 561 ms
100,728 KB
testcase_08 AC 536 ms
101,060 KB
testcase_09 AC 550 ms
100,724 KB
testcase_10 AC 477 ms
103,832 KB
testcase_11 AC 500 ms
107,180 KB
testcase_12 AC 471 ms
104,100 KB
testcase_13 AC 490 ms
100,884 KB
testcase_14 AC 520 ms
100,856 KB
testcase_15 AC 456 ms
105,204 KB
testcase_16 AC 551 ms
107,588 KB
testcase_17 AC 529 ms
107,624 KB
testcase_18 AC 524 ms
107,732 KB
testcase_19 AC 535 ms
100,896 KB
testcase_20 AC 527 ms
100,952 KB
testcase_21 AC 534 ms
101,068 KB
testcase_22 AC 477 ms
104,076 KB
testcase_23 AC 507 ms
107,140 KB
testcase_24 AC 71 ms
71,916 KB
testcase_25 AC 87 ms
77,040 KB
testcase_26 AC 82 ms
77,104 KB
testcase_27 AC 79 ms
76,348 KB
testcase_28 AC 147 ms
80,416 KB
testcase_29 AC 108 ms
77,464 KB
testcase_30 AC 83 ms
76,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

from math import floor
def check(m):
    val = 0
    for i in range(N):
        val += floor(L[i]/m)
    return val >= K    

yes = 10**-9
no = 10 ** 18
for i in range(200):
    mid = (yes + no)/2
    if check(mid):
        yes = mid
    else:
        no = mid
print(yes)
0