結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ayaoni
提出日時 2020-12-06 02:49:59
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 650 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 109,400 KB
最終ジャッジ日時 2025-03-03 11:45:37
合計ジャッジ時間 13,073 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
L = LI()
K = I()

ok = 0
ng = max(L)+1
while ng-ok >= 10**(-10):
    mid = (ok+ng)/2
    if sum(int(L[i]/mid) for i in range(N)) >= K:
        ok = mid
    else:
        ng = mid

print(ok)
0