結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー irumo8202irumo8202
提出日時 2022-01-24 16:15:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,671 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 35,860 KB
最終ジャッジ日時 2024-04-26 01:29:27
合計ジャッジ時間 44,504 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,351 ms
35,764 KB
testcase_01 AC 29 ms
10,880 KB
testcase_02 AC 1,004 ms
20,188 KB
testcase_03 AC 1,888 ms
28,756 KB
testcase_04 AC 2,133 ms
33,968 KB
testcase_05 AC 2,104 ms
33,968 KB
testcase_06 AC 1,825 ms
33,964 KB
testcase_07 AC 2,671 ms
35,736 KB
testcase_08 AC 2,578 ms
35,732 KB
testcase_09 AC 2,533 ms
35,860 KB
testcase_10 AC 1,957 ms
30,660 KB
testcase_11 AC 1,984 ms
33,024 KB
testcase_12 AC 1,548 ms
29,900 KB
testcase_13 AC 2,379 ms
34,092 KB
testcase_14 AC 2,481 ms
34,536 KB
testcase_15 AC 2,217 ms
31,956 KB
testcase_16 AC 1,284 ms
33,972 KB
testcase_17 AC 1,173 ms
34,084 KB
testcase_18 AC 755 ms
33,924 KB
testcase_19 AC 1,230 ms
35,732 KB
testcase_20 AC 917 ms
35,736 KB
testcase_21 AC 909 ms
35,732 KB
testcase_22 AC 679 ms
31,756 KB
testcase_23 AC 714 ms
32,904 KB
testcase_24 AC 27 ms
10,880 KB
testcase_25 AC 76 ms
11,392 KB
testcase_26 AC 48 ms
11,008 KB
testcase_27 AC 39 ms
10,880 KB
testcase_28 AC 428 ms
14,692 KB
testcase_29 AC 229 ms
12,672 KB
testcase_30 AC 84 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(map(lambda x: int(x) * 10 ** 10, input().split()))
K = int(input())


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


left = 0
right = 10 ** 20

while right - left > 1:
    mid = (right + left) // 2
    if solve(mid):
        left = mid
    else:
        right = mid - 1

print(left / 10 ** 10)
0