結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,363 ms
35,756 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 989 ms
20,188 KB
testcase_03 AC 1,897 ms
28,752 KB
testcase_04 AC 2,127 ms
33,964 KB
testcase_05 AC 2,122 ms
33,964 KB
testcase_06 AC 1,783 ms
33,964 KB
testcase_07 AC 2,629 ms
35,736 KB
testcase_08 AC 2,527 ms
35,732 KB
testcase_09 AC 2,518 ms
35,732 KB
testcase_10 AC 1,950 ms
30,660 KB
testcase_11 AC 1,974 ms
33,028 KB
testcase_12 AC 1,546 ms
29,896 KB
testcase_13 AC 2,314 ms
33,964 KB
testcase_14 AC 2,400 ms
34,532 KB
testcase_15 AC 2,172 ms
32,084 KB
testcase_16 AC 1,253 ms
33,968 KB
testcase_17 AC 1,141 ms
34,068 KB
testcase_18 AC 770 ms
34,084 KB
testcase_19 AC 1,214 ms
35,732 KB
testcase_20 AC 894 ms
35,728 KB
testcase_21 AC 924 ms
35,732 KB
testcase_22 AC 688 ms
31,832 KB
testcase_23 AC 716 ms
33,032 KB
testcase_24 AC 30 ms
10,752 KB
testcase_25 AC 78 ms
11,392 KB
testcase_26 AC 48 ms
11,008 KB
testcase_27 AC 41 ms
11,008 KB
testcase_28 AC 434 ms
14,688 KB
testcase_29 AC 225 ms
12,792 KB
testcase_30 AC 80 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