結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ntudantuda
提出日時 2024-02-26 20:39:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,639 ms / 5,000 ms
コード長 320 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 116,384 KB
最終ジャッジ日時 2024-02-26 20:39:56
合計ジャッジ時間 25,774 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,639 ms
114,636 KB
testcase_01 AC 38 ms
59,372 KB
testcase_02 AC 468 ms
88,320 KB
testcase_03 AC 874 ms
102,764 KB
testcase_04 AC 1,094 ms
112,120 KB
testcase_05 AC 1,078 ms
111,480 KB
testcase_06 AC 1,071 ms
111,992 KB
testcase_07 AC 1,161 ms
104,228 KB
testcase_08 AC 1,209 ms
116,004 KB
testcase_09 AC 1,210 ms
116,000 KB
testcase_10 AC 991 ms
113,992 KB
testcase_11 AC 1,054 ms
115,000 KB
testcase_12 AC 920 ms
115,480 KB
testcase_13 AC 1,158 ms
103,976 KB
testcase_14 AC 1,119 ms
107,264 KB
testcase_15 AC 1,026 ms
103,624 KB
testcase_16 AC 928 ms
111,992 KB
testcase_17 AC 877 ms
111,608 KB
testcase_18 AC 457 ms
111,608 KB
testcase_19 AC 612 ms
116,384 KB
testcase_20 AC 562 ms
116,252 KB
testcase_21 AC 554 ms
116,384 KB
testcase_22 AC 417 ms
114,120 KB
testcase_23 AC 443 ms
113,604 KB
testcase_24 AC 35 ms
53,460 KB
testcase_25 AC 68 ms
75,288 KB
testcase_26 AC 54 ms
75,152 KB
testcase_27 AC 50 ms
74,756 KB
testcase_28 AC 228 ms
80,492 KB
testcase_29 AC 133 ms
76,124 KB
testcase_30 AC 70 ms
75,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = 10 ** 10
L = [l*X for l in list(map(int,input().split()))]
K = int(input())
lb = 0
ub = 10 ** 20

def check(x):
    tmp = 0
    for l in L:
        tmp += l//x
    return tmp >= K

while ub - lb > 1:
    mid = (ub + lb) // 2
    if check(mid):
        lb = mid
    else:
        ub = mid
print(lb/X)
0