結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ynyn
提出日時 2018-04-17 19:40:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,136 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 107,924 KB
最終ジャッジ日時 2024-04-26 00:28:54
合計ジャッジ時間 29,999 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 712 ms
102,244 KB
testcase_01 AC 42 ms
58,452 KB
testcase_02 AC 813 ms
81,820 KB
testcase_03 AC 1,544 ms
98,404 KB
testcase_04 AC 1,466 ms
106,256 KB
testcase_05 AC 1,428 ms
106,652 KB
testcase_06 AC 1,153 ms
106,580 KB
testcase_07 AC 2,126 ms
102,196 KB
testcase_08 AC 2,136 ms
102,012 KB
testcase_09 AC 1,600 ms
102,348 KB
testcase_10 AC 1,289 ms
101,160 KB
testcase_11 AC 1,366 ms
105,044 KB
testcase_12 AC 992 ms
100,664 KB
testcase_13 AC 1,886 ms
104,624 KB
testcase_14 AC 2,012 ms
107,924 KB
testcase_15 AC 1,441 ms
104,492 KB
testcase_16 AC 639 ms
106,448 KB
testcase_17 AC 559 ms
104,980 KB
testcase_18 AC 535 ms
104,972 KB
testcase_19 AC 589 ms
102,000 KB
testcase_20 AC 580 ms
102,432 KB
testcase_21 AC 548 ms
102,076 KB
testcase_22 AC 484 ms
100,220 KB
testcase_23 AC 516 ms
104,184 KB
testcase_24 AC 37 ms
53,484 KB
testcase_25 AC 93 ms
63,420 KB
testcase_26 AC 64 ms
62,292 KB
testcase_27 AC 56 ms
60,424 KB
testcase_28 AC 391 ms
70,620 KB
testcase_29 AC 230 ms
67,660 KB
testcase_30 AC 95 ms
63,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = list(map(int, input().split()))
k = int(input())

def f(x):
    ret = 0
    for i in range(n):
        ret += l[i] // x
    return ret

ok = 0
ng = 10 ** 9 + 1

for i in range(100):
    m = (ok + ng) / 2
    if f(m) >= k:
        ok = m
    else:
        ng = m

print(ok)
0