結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-27 18:31:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,283 ms / 5,000 ms |
| コード長 | 480 bytes |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 43,948 KB |
| 最終ジャッジ日時 | 2025-03-03 11:31:24 |
| 合計ジャッジ時間 | 30,317 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N = int(readline())
L = np.array(readline().split(),np.int64)
K = int(read())
def test(x):
# 長さ x を K 本作れる
return (L//x).astype(np.int64).sum() >= K
left = 0 # 可能
right = 10 ** 9 + 100 # 無理
for _ in range(100):
x = (left + right) / 2
if test(x):
left = x
else:
right = x
print(left)
maspy