結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ayaoniayaoni
提出日時 2020-12-06 02:55:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 251 ms / 5,000 ms
コード長 634 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 107,472 KB
最終ジャッジ日時 2024-04-26 01:12:22
合計ジャッジ時間 7,339 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 234 ms
101,812 KB
testcase_01 AC 44 ms
59,808 KB
testcase_02 AC 125 ms
86,960 KB
testcase_03 AC 186 ms
98,212 KB
testcase_04 AC 234 ms
106,340 KB
testcase_05 AC 236 ms
106,212 KB
testcase_06 AC 235 ms
106,208 KB
testcase_07 AC 234 ms
102,292 KB
testcase_08 AC 241 ms
102,148 KB
testcase_09 AC 242 ms
102,236 KB
testcase_10 AC 217 ms
102,736 KB
testcase_11 AC 227 ms
106,264 KB
testcase_12 AC 211 ms
102,512 KB
testcase_13 AC 220 ms
104,508 KB
testcase_14 AC 226 ms
107,472 KB
testcase_15 AC 209 ms
103,868 KB
testcase_16 AC 233 ms
106,276 KB
testcase_17 AC 251 ms
106,288 KB
testcase_18 AC 237 ms
106,348 KB
testcase_19 AC 238 ms
102,204 KB
testcase_20 AC 235 ms
102,348 KB
testcase_21 AC 235 ms
102,316 KB
testcase_22 AC 214 ms
102,732 KB
testcase_23 AC 221 ms
105,788 KB
testcase_24 AC 37 ms
53,280 KB
testcase_25 AC 53 ms
68,588 KB
testcase_26 AC 52 ms
65,124 KB
testcase_27 AC 46 ms
62,568 KB
testcase_28 AC 85 ms
79,624 KB
testcase_29 AC 69 ms
76,724 KB
testcase_30 AC 55 ms
68,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
L = LI()
K = I()

ok = 0
ng = max(L)+1
for _ in range(70):
    mid = (ok+ng)/2
    if sum(int(l/mid) for l in L) >= K:
        ok = mid
    else:
        ng = mid

print(ok)
0