結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-26 23:00:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 391 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 39,284 KB |
| 最終ジャッジ日時 | 2025-03-03 12:09:19 |
| 合計ジャッジ時間 | 27,166 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 TLE * 1 -- * 20 |
ソースコード
N = int(input())
L = list(map(int,input().split()))
K = int(input())
ok = 0
ng = 10**9
def is_ok(x):
cnt = 0
for i in range(N):
num = L[i] // x
cnt += num
if cnt >= K:
return 1
return 0
while ng - ok > 10**(-10):
mid = (ng + ok) / 2
if is_ok(mid):
ok = mid
else:
ng = mid
# print(ok,ng)
print(ok)