結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
AEn
|
| 提出日時 | 2022-12-15 01:44:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 373 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 82,620 KB |
| 実行使用メモリ | 109,012 KB |
| 最終ジャッジ日時 | 2025-03-03 12:03:45 |
| 合計ジャッジ時間 | 11,709 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 TLE * 1 -- * 20 |
ソースコード
N = int(input())
L = list(map(int, input().split()))
K = int(input())
if K==1:
exit(print(max(L)))
def judge(l):
cnt = 0
for i in range(N):
cnt += L[i]//l
if cnt>=K:
return True
else:
return False
ok, ng = 0, 10**11
while ng-ok>1e-10:
mid = (ok+ng)/2
if judge(mid):
ok = mid
else:
ng = mid
print(ok)
AEn