結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー tnodino
提出日時 2022-03-06 14:39:25
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 345 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 82,172 KB
実行使用メモリ 109,256 KB
最終ジャッジ日時 2025-03-03 11:56:22
合計ジャッジ時間 13,071 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

def Check(x):
    cnt = 0
    for i in range(N):
        cnt += L[i] // x
    if cnt >= K:
        return True
    else:
        return False

N = int(input())
L = list(map(int,input().split()))
K = int(input())
ok = 0
ng = max(L) + 1
while ng - ok > 1e-9:
    x = (ok + ng) / 2
    if Check(x):
        ok = x
    else:
        ng = x
print(ok)
0