結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-03 20:21:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 35,732 KB |
| 最終ジャッジ日時 | 2025-03-03 11:38:02 |
| 合計ジャッジ時間 | 31,982 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 TLE * 1 -- * 13 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
L=[int(i) for i in input().split()]
k=int(input())
def chk(x):
ct=0
for ln in L:
ct+=int(ln/x)
return ct>=k
l,r=0,max(L)
t=0
while r-l>10**(-9) and t<=10**5:
mid=(l+r)/2
if chk(mid):
l=mid
else:
r=mid
t+=1
print(l)
takakin