結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2021-02-24 22:24:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 205 ms / 5,000 ms |
| コード長 | 360 bytes |
| コンパイル時間 | 454 ms |
| コンパイル使用メモリ | 82,224 KB |
| 実行使用メモリ | 104,988 KB |
| 最終ジャッジ日時 | 2025-03-03 11:50:06 |
| 合計ジャッジ時間 | 6,502 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
eps = 1e-10
N = int(input())
A = list(map(lambda x: float(x) + eps, input().split()))
K = int(input())
def OK(L):
cnt = 0
for a in A:
cnt += int(a / L)
return cnt >= K
wa = eps
ac = 1e20
while ac - wa > ac * eps:
wj = (ac + wa) * 0.5
if OK(wj):
wa = wj
else:
ac = wj
print("{:.20f}".format((ac + wa) * 0.5))
tktk_snsn