結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-21 14:44:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 478 ms / 5,000 ms |
| コード長 | 311 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 107,912 KB |
| 最終ジャッジ日時 | 2025-03-03 11:46:20 |
| 合計ジャッジ時間 | 11,177 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
N = int(input())
L = list(map(int,input().split()))
K = int(input())
eps = 1e-10
high = sum(L)/K+5
low = eps
while (high-low>eps) and (high-low)/high>eps:
mid = (high+low)/2
cnt = 0
for i in range(N):
cnt += L[i]//mid
if cnt>=K:
low = mid
else:
high = mid
print(high)