結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ynyn
提出日時 2018-04-17 19:32:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 30,076 KB
最終ジャッジ日時 2023-09-09 11:05:49
合計ジャッジ時間 60,066 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,993 ms
29,960 KB
testcase_01 AC 16 ms
7,940 KB
testcase_02 AC 1,275 ms
16,452 KB
testcase_03 AC 2,446 ms
23,884 KB
testcase_04 AC 2,674 ms
28,928 KB
testcase_05 AC 2,716 ms
28,800 KB
testcase_06 AC 2,460 ms
28,812 KB
testcase_07 AC 3,366 ms
29,836 KB
testcase_08 AC 3,401 ms
30,044 KB
testcase_09 AC 2,849 ms
30,048 KB
testcase_10 AC 2,449 ms
25,664 KB
testcase_11 AC 2,566 ms
27,992 KB
testcase_12 AC 2,039 ms
25,216 KB
testcase_13 AC 3,100 ms
28,120 KB
testcase_14 AC 3,210 ms
28,964 KB
testcase_15 AC 2,463 ms
26,772 KB
testcase_16 AC 1,901 ms
28,804 KB
testcase_17 AC 1,874 ms
28,780 KB
testcase_18 AC 1,814 ms
28,828 KB
testcase_19 AC 1,862 ms
29,916 KB
testcase_20 AC 1,821 ms
30,076 KB
testcase_21 AC 1,818 ms
30,008 KB
testcase_22 AC 1,633 ms
25,700 KB
testcase_23 AC 1,719 ms
28,112 KB
testcase_24 WA -
testcase_25 AC 88 ms
8,580 KB
testcase_26 AC 42 ms
8,264 KB
testcase_27 AC 33 ms
7,792 KB
testcase_28 AC 577 ms
11,532 KB
testcase_29 AC 307 ms
9,720 KB
testcase_30 AC 91 ms
8,684 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