結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー KudeKude
提出日時 2021-01-25 01:19:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 517 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 464 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 107,232 KB
最終ジャッジ日時 2024-04-26 01:16:01
合計ジャッジ時間 13,559 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 494 ms
102,436 KB
testcase_01 AC 47 ms
62,712 KB
testcase_02 AC 225 ms
86,720 KB
testcase_03 AC 369 ms
98,252 KB
testcase_04 AC 486 ms
106,236 KB
testcase_05 AC 490 ms
106,232 KB
testcase_06 AC 492 ms
106,076 KB
testcase_07 AC 499 ms
101,988 KB
testcase_08 AC 517 ms
102,244 KB
testcase_09 AC 496 ms
102,064 KB
testcase_10 AC 448 ms
102,248 KB
testcase_11 AC 463 ms
105,820 KB
testcase_12 AC 426 ms
102,432 KB
testcase_13 AC 452 ms
104,396 KB
testcase_14 AC 470 ms
107,232 KB
testcase_15 AC 429 ms
104,180 KB
testcase_16 AC 488 ms
105,944 KB
testcase_17 AC 480 ms
106,148 KB
testcase_18 AC 483 ms
106,272 KB
testcase_19 AC 495 ms
102,156 KB
testcase_20 AC 485 ms
102,220 KB
testcase_21 AC 491 ms
102,044 KB
testcase_22 AC 443 ms
102,324 KB
testcase_23 AC 469 ms
106,000 KB
testcase_24 AC 36 ms
53,564 KB
testcase_25 AC 65 ms
75,808 KB
testcase_26 AC 56 ms
69,992 KB
testcase_27 AC 54 ms
66,964 KB
testcase_28 AC 130 ms
79,496 KB
testcase_29 AC 89 ms
76,660 KB
testcase_30 AC 65 ms
76,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
L = list(map(int, input().split()))
k = int(input())
r = sum(L) + 1
l = 0
for _ in range(200):
    c = (r + l) / 2
    cnt = sum(int(li / c) for li in L)
    if cnt >= k:
        l = c
    else:
        r = c
print(l)
0