結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー takeshiDtakeshiD
提出日時 2020-03-07 07:26:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,263 ms / 5,000 ms
コード長 323 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,792 KB
最終ジャッジ日時 2024-04-26 01:01:17
合計ジャッジ時間 56,496 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,880 ms
32,688 KB
testcase_01 AC 30 ms
11,008 KB
testcase_02 AC 1,244 ms
19,036 KB
testcase_03 AC 2,352 ms
26,580 KB
testcase_04 AC 2,630 ms
29,360 KB
testcase_05 AC 2,630 ms
29,364 KB
testcase_06 AC 2,300 ms
29,356 KB
testcase_07 AC 3,257 ms
32,668 KB
testcase_08 AC 3,263 ms
32,660 KB
testcase_09 AC 2,793 ms
32,792 KB
testcase_10 AC 2,383 ms
26,692 KB
testcase_11 AC 2,527 ms
28,540 KB
testcase_12 AC 2,031 ms
25,928 KB
testcase_13 AC 2,994 ms
31,152 KB
testcase_14 AC 3,086 ms
31,592 KB
testcase_15 AC 2,436 ms
29,484 KB
testcase_16 AC 1,856 ms
29,368 KB
testcase_17 AC 1,781 ms
29,344 KB
testcase_18 AC 1,744 ms
29,352 KB
testcase_19 AC 1,703 ms
32,660 KB
testcase_20 AC 1,680 ms
32,656 KB
testcase_21 AC 1,672 ms
32,788 KB
testcase_22 AC 1,590 ms
27,656 KB
testcase_23 AC 1,717 ms
28,548 KB
testcase_24 AC 30 ms
10,880 KB
testcase_25 AC 99 ms
11,264 KB
testcase_26 AC 57 ms
10,880 KB
testcase_27 AC 48 ms
10,880 KB
testcase_28 AC 561 ms
14,312 KB
testcase_29 AC 306 ms
12,536 KB
testcase_30 AC 103 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def c(x):
    if x==0: return True
    global L,K
    ret = 0
    for l in L:
        ret += l//x
    return ret>=K

N = int(input())
L = list(map(int, input().split()))
K = int(input())
inf = 0
sup = 10**9
for i in range(100):
    mid = (inf+sup)/2.0
    if c(mid):
        inf = mid
    else:
        sup = mid
print(mid)
0