結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー BucchimanBucchiman
提出日時 2020-08-18 00:43:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 541 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 61,892 KB
最終ジャッジ日時 2024-04-19 21:11:54
合計ジャッジ時間 32,744 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,277 ms
61,892 KB
testcase_01 AC 27 ms
10,880 KB
testcase_02 AC 774 ms
19,016 KB
testcase_03 AC 1,465 ms
26,564 KB
testcase_04 AC 1,644 ms
29,212 KB
testcase_05 AC 1,672 ms
29,344 KB
testcase_06 AC 1,528 ms
29,212 KB
testcase_07 AC 2,019 ms
32,776 KB
testcase_08 AC 2,042 ms
32,644 KB
testcase_09 AC 1,791 ms
32,344 KB
testcase_10 AC 1,532 ms
27,512 KB
testcase_11 AC 1,597 ms
28,524 KB
testcase_12 AC 1,336 ms
26,832 KB
testcase_13 AC 1,852 ms
31,020 KB
testcase_14 AC 1,938 ms
31,936 KB
testcase_15 AC 1,539 ms
29,516 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	code
# CreatedDate:  2020-08-17 16:53:46 +0900
# LastModified: 2020-08-18 00:43:11 +0900
#


def main():
    N = int(input())
    L = list(map(int, input().split()))
    K = int(input())
    left = 0
    right = 10**9
    while left+10**(-9) < right:
        middle = (left+right)/2
        sum_sticks = sum(l//middle for l in L)
        if sum_sticks < K:
            right = middle
        else:
            left = middle
    print(left)


if __name__ == "__main__":
    main()
0