結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー pluto77pluto77
提出日時 2016-08-11 10:11:06
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,058 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 2,269 ms
コンパイル使用メモリ 76,332 KB
実行使用メモリ 103,760 KB
最終ジャッジ日時 2024-04-25 23:44:58
合計ジャッジ時間 16,959 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 357 ms
103,760 KB
testcase_01 AC 77 ms
77,484 KB
testcase_02 AC 456 ms
87,060 KB
testcase_03 AC 784 ms
95,892 KB
testcase_04 AC 798 ms
100,988 KB
testcase_05 AC 807 ms
101,244 KB
testcase_06 AC 586 ms
101,508 KB
testcase_07 AC 1,058 ms
103,252 KB
testcase_08 AC 1,056 ms
103,372 KB
testcase_09 AC 758 ms
103,760 KB
testcase_10 AC 740 ms
98,360 KB
testcase_11 AC 778 ms
100,460 KB
testcase_12 AC 536 ms
98,236 KB
testcase_13 AC 964 ms
100,472 KB
testcase_14 AC 992 ms
103,068 KB
testcase_15 AC 674 ms
99,888 KB
testcase_16 AC 338 ms
101,240 KB
testcase_17 AC 304 ms
101,492 KB
testcase_18 AC 287 ms
101,632 KB
testcase_19 AC 302 ms
103,116 KB
testcase_20 AC 291 ms
103,368 KB
testcase_21 AC 290 ms
103,124 KB
testcase_22 AC 266 ms
98,748 KB
testcase_23 AC 282 ms
100,988 KB
testcase_24 AC 74 ms
75,808 KB
testcase_25 AC 107 ms
78,620 KB
testcase_26 AC 96 ms
78,732 KB
testcase_27 AC 88 ms
78,212 KB
testcase_28 AC 253 ms
80,908 KB
testcase_29 AC 177 ms
79,376 KB
testcase_30 AC 111 ms
78,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
#yuki67

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

EPS=1e-9
l=0.0
r=10000000000
while l+EPS<r and l*(1.0+EPS)<r:
 m=(l+r)/2.0
 sum=0.0
 for i in xrange(n):
  sum+=ll[i]//m
 if sum<k:
  r=m
 else:
  l=m
   
print (l+r)/2
0