結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-01-01 22:39:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,885 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 82,476 KB
実行使用メモリ 108,028 KB
最終ジャッジ日時 2024-04-26 01:25:59
合計ジャッジ時間 25,913 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 660 ms
102,524 KB
testcase_01 AC 40 ms
58,704 KB
testcase_02 AC 670 ms
80,536 KB
testcase_03 AC 1,256 ms
95,328 KB
testcase_04 AC 1,187 ms
103,712 KB
testcase_05 AC 1,119 ms
103,792 KB
testcase_06 AC 953 ms
103,772 KB
testcase_07 AC 1,745 ms
102,016 KB
testcase_08 AC 1,885 ms
102,248 KB
testcase_09 AC 1,361 ms
102,152 KB
testcase_10 AC 1,120 ms
99,308 KB
testcase_11 AC 1,169 ms
103,360 KB
testcase_12 AC 832 ms
98,844 KB
testcase_13 AC 1,599 ms
104,728 KB
testcase_14 AC 1,660 ms
108,028 KB
testcase_15 AC 1,178 ms
103,096 KB
testcase_16 AC 535 ms
103,556 KB
testcase_17 AC 471 ms
104,240 KB
testcase_18 AC 448 ms
103,476 KB
testcase_19 AC 620 ms
102,144 KB
testcase_20 AC 471 ms
102,352 KB
testcase_21 AC 466 ms
101,880 KB
testcase_22 AC 409 ms
99,096 KB
testcase_23 AC 431 ms
102,400 KB
testcase_24 AC 36 ms
52,720 KB
testcase_25 AC 80 ms
62,176 KB
testcase_26 AC 59 ms
60,528 KB
testcase_27 AC 50 ms
60,208 KB
testcase_28 AC 324 ms
68,752 KB
testcase_29 AC 191 ms
64,208 KB
testcase_30 AC 84 ms
62,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
L = list(map(int,input().split()))
K = int(input())


def calc(x):
    count = 0
    for l in L:
        count += l//x
    return count

l = 0
r = 10**9+5

for i in range(80):
    m = (r+l)/2
    if calc(m) >= K:
        l = m
    else:
        r = m

print(l)
0