結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー mlihua09mlihua09
提出日時 2020-09-01 21:16:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,137 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 456 ms
コンパイル使用メモリ 82,816 KB
実行使用メモリ 108,084 KB
最終ジャッジ日時 2024-04-26 01:11:39
合計ジャッジ時間 16,841 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 363 ms
102,628 KB
testcase_01 AC 42 ms
59,408 KB
testcase_02 AC 443 ms
87,188 KB
testcase_03 AC 824 ms
98,512 KB
testcase_04 AC 823 ms
106,792 KB
testcase_05 AC 817 ms
106,460 KB
testcase_06 AC 608 ms
106,668 KB
testcase_07 AC 1,137 ms
102,324 KB
testcase_08 AC 1,135 ms
102,600 KB
testcase_09 AC 794 ms
102,308 KB
testcase_10 AC 760 ms
103,120 KB
testcase_11 AC 785 ms
106,400 KB
testcase_12 AC 531 ms
102,780 KB
testcase_13 AC 1,014 ms
105,112 KB
testcase_14 AC 1,074 ms
108,084 KB
testcase_15 AC 709 ms
104,496 KB
testcase_16 AC 327 ms
106,684 KB
testcase_17 AC 285 ms
106,560 KB
testcase_18 AC 271 ms
106,444 KB
testcase_19 AC 296 ms
102,228 KB
testcase_20 AC 315 ms
102,228 KB
testcase_21 AC 280 ms
102,268 KB
testcase_22 AC 245 ms
102,956 KB
testcase_23 AC 264 ms
106,420 KB
testcase_24 AC 38 ms
52,992 KB
testcase_25 AC 76 ms
67,016 KB
testcase_26 AC 61 ms
64,968 KB
testcase_27 AC 52 ms
61,744 KB
testcase_28 AC 235 ms
79,652 KB
testcase_29 AC 154 ms
77,000 KB
testcase_30 AC 78 ms
68,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

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

x = 0
y = 10 ** 9

K = int(input())

while x * (1 + 10 ** (-10)) < y:
    z = (x + y) / 2
    k = 0
    for l in L:
        
        k += l // z
        
    if k >= K:
        x = z
        
    else:
        y = z
        
print(x)
0