結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-10-10 09:40:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,435 ms / 5,000 ms
コード長 544 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 107,648 KB
最終ジャッジ日時 2023-09-06 10:40:55
合計ジャッジ時間 34,260 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 874 ms
102,548 KB
testcase_01 AC 112 ms
77,092 KB
testcase_02 AC 909 ms
88,196 KB
testcase_03 AC 1,644 ms
99,108 KB
testcase_04 AC 1,627 ms
107,428 KB
testcase_05 AC 1,621 ms
107,392 KB
testcase_06 AC 1,249 ms
107,124 KB
testcase_07 AC 2,259 ms
103,280 KB
testcase_08 AC 2,435 ms
103,252 KB
testcase_09 AC 1,721 ms
102,860 KB
testcase_10 AC 1,490 ms
103,872 KB
testcase_11 AC 1,557 ms
107,028 KB
testcase_12 AC 1,112 ms
103,784 KB
testcase_13 AC 2,066 ms
105,668 KB
testcase_14 AC 2,154 ms
103,016 KB
testcase_15 AC 1,516 ms
106,008 KB
testcase_16 AC 746 ms
107,648 KB
testcase_17 AC 667 ms
107,348 KB
testcase_18 AC 631 ms
107,412 KB
testcase_19 AC 846 ms
102,956 KB
testcase_20 AC 648 ms
103,124 KB
testcase_21 AC 660 ms
103,000 KB
testcase_22 AC 582 ms
103,628 KB
testcase_23 AC 610 ms
107,012 KB
testcase_24 AC 106 ms
72,952 KB
testcase_25 AC 163 ms
77,840 KB
testcase_26 AC 133 ms
78,080 KB
testcase_27 AC 125 ms
77,596 KB
testcase_28 AC 471 ms
81,116 KB
testcase_29 AC 303 ms
78,384 KB
testcase_30 AC 168 ms
78,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit
# pypyjit.set_param('max_unroll_recursion=-1')
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline


N = int(input())
L = list(map(int,input().split()))
K = int(input())

def is_ok(x):
    if x==0:
        return True
    tmp = 0
    for l in L:
        tmp += l//x
        
    return tmp>=K
    
x = 0
y = 10**9 + 1
INF = 10**9+100
for _ in range(100):
    mid = (y+x)/2
    if is_ok(mid):
        x = mid
    else:
        y = mid
print(x)
0