結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー nari11111nari11111
提出日時 2014-11-17 00:17:23
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 6,560 KB
実行使用メモリ 23,252 KB
最終ジャッジ日時 2023-08-30 08:42:13
合計ジャッジ時間 51,968 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 12 ms
5,936 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2,213 ms
21,564 KB
testcase_05 AC 2,220 ms
21,528 KB
testcase_06 WA -
testcase_07 AC 2,150 ms
23,096 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1,993 ms
20,060 KB
testcase_11 AC 2,105 ms
20,768 KB
testcase_12 WA -
testcase_13 AC 1,967 ms
21,620 KB
testcase_14 AC 2,043 ms
22,308 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 11 ms
5,956 KB
testcase_25 AC 53 ms
6,268 KB
testcase_26 AC 26 ms
6,048 KB
testcase_27 AC 21 ms
5,860 KB
testcase_28 AC 350 ms
8,512 KB
testcase_29 AC 179 ms
7,148 KB
testcase_30 AC 54 ms
6,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# n=5
# k=10000
# # l=[99, 88, 77, 66, 55]
# l=[99, 88, 77, 66, 55]

n=int(raw_input())
l=map(int,raw_input().split())
k=int(raw_input())

def C(x):
    num=0
    for i in xrange(n):
        num+= int(l[i]/x)
    return num >= k

lb = 0
ub = 10000

for i in xrange(50):
    mid = float(lb+ub)/2
    if C(mid):lb=mid
    else:ub=mid

print float(ub)
0