結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー lllllll88938494lllllll88938494
提出日時 2022-06-02 15:37:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,693 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 82,224 KB
実行使用メモリ 107,896 KB
最終ジャッジ日時 2024-04-26 01:34:34
合計ジャッジ時間 24,192 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 601 ms
102,324 KB
testcase_01 AC 40 ms
59,304 KB
testcase_02 AC 637 ms
81,236 KB
testcase_03 AC 1,193 ms
96,260 KB
testcase_04 AC 1,115 ms
105,396 KB
testcase_05 AC 1,107 ms
106,448 KB
testcase_06 AC 889 ms
106,320 KB
testcase_07 AC 1,692 ms
102,252 KB
testcase_08 AC 1,693 ms
102,160 KB
testcase_09 AC 1,410 ms
101,952 KB
testcase_10 AC 1,005 ms
101,068 KB
testcase_11 AC 1,057 ms
104,104 KB
testcase_12 AC 796 ms
101,072 KB
testcase_13 AC 1,571 ms
104,796 KB
testcase_14 AC 1,571 ms
107,896 KB
testcase_15 AC 1,144 ms
104,284 KB
testcase_16 AC 531 ms
104,780 KB
testcase_17 AC 472 ms
104,760 KB
testcase_18 AC 449 ms
104,608 KB
testcase_19 AC 481 ms
102,204 KB
testcase_20 AC 468 ms
102,196 KB
testcase_21 AC 458 ms
102,356 KB
testcase_22 AC 404 ms
100,280 KB
testcase_23 AC 434 ms
103,996 KB
testcase_24 AC 36 ms
52,872 KB
testcase_25 AC 81 ms
63,268 KB
testcase_26 AC 59 ms
62,352 KB
testcase_27 AC 53 ms
61,864 KB
testcase_28 AC 317 ms
70,600 KB
testcase_29 AC 189 ms
66,072 KB
testcase_30 AC 98 ms
63,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def  cal(x):
    cnt=0
    for i in range(n):
        cnt+= ns[i] // x
    return cnt

l=0
r=10**10

for i in range(80):
    mid= (l+r) / 2
    if cal(mid) < k:
        r=mid
    else:
        l=mid

print(r)
        
0