結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ynyn
提出日時 2018-04-17 19:33:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 596 ms
コンパイル使用メモリ 86,712 KB
実行使用メモリ 107,504 KB
最終ジャッジ日時 2023-09-09 11:06:37
合計ジャッジ時間 32,016 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 809 ms
99,988 KB
testcase_01 AC 69 ms
75,800 KB
testcase_02 AC 838 ms
87,624 KB
testcase_03 AC 1,592 ms
99,344 KB
testcase_04 AC 1,515 ms
107,504 KB
testcase_05 AC 1,494 ms
107,420 KB
testcase_06 AC 1,180 ms
107,220 KB
testcase_07 AC 2,180 ms
100,352 KB
testcase_08 AC 2,223 ms
100,072 KB
testcase_09 AC 1,625 ms
100,448 KB
testcase_10 AC 1,382 ms
103,812 KB
testcase_11 AC 1,469 ms
107,140 KB
testcase_12 AC 1,039 ms
103,496 KB
testcase_13 AC 2,017 ms
100,176 KB
testcase_14 AC 2,078 ms
100,176 KB
testcase_15 AC 1,423 ms
104,524 KB
testcase_16 AC 709 ms
107,316 KB
testcase_17 AC 630 ms
107,028 KB
testcase_18 AC 594 ms
107,376 KB
testcase_19 AC 651 ms
100,464 KB
testcase_20 AC 640 ms
100,556 KB
testcase_21 AC 587 ms
100,464 KB
testcase_22 AC 544 ms
103,836 KB
testcase_23 AC 558 ms
107,132 KB
testcase_24 WA -
testcase_25 AC 122 ms
76,344 KB
testcase_26 AC 91 ms
76,224 KB
testcase_27 AC 81 ms
75,972 KB
testcase_28 AC 426 ms
79,940 KB
testcase_29 AC 264 ms
77,168 KB
testcase_30 AC 128 ms
76,496 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 = 1
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