結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー lllllll88938494
提出日時 2022-06-02 15:34:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 657 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 82,744 KB
実行使用メモリ 108,356 KB
最終ジャッジ日時 2025-03-03 11:58:52
合計ジャッジ時間 14,151 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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(60):
    mid= (l+r) / 2
    if cal(mid) < k:
        r=mid
    else:
        l=mid

print(r)
        
0