結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー kyuridenamidakyuridenamida
提出日時 2016-03-11 14:27:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,471 ms / 5,000 ms
コード長 455 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 40,772 KB
最終ジャッジ日時 2024-04-25 23:41:05
合計ジャッジ時間 74,207 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,784 ms
34,224 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 1,263 ms
21,968 KB
testcase_03 AC 2,418 ms
32,260 KB
testcase_04 AC 3,228 ms
32,584 KB
testcase_05 AC 3,225 ms
32,572 KB
testcase_06 AC 3,104 ms
31,144 KB
testcase_07 AC 3,471 ms
40,772 KB
testcase_08 AC 3,378 ms
40,772 KB
testcase_09 AC 3,397 ms
39,268 KB
testcase_10 AC 3,013 ms
30,396 KB
testcase_11 AC 3,139 ms
31,480 KB
testcase_12 AC 2,695 ms
28,376 KB
testcase_13 AC 3,184 ms
38,268 KB
testcase_14 AC 3,289 ms
39,364 KB
testcase_15 AC 2,988 ms
35,176 KB
testcase_16 AC 2,983 ms
29,748 KB
testcase_17 AC 3,016 ms
29,856 KB
testcase_18 AC 2,964 ms
29,860 KB
testcase_19 AC 3,084 ms
34,516 KB
testcase_20 AC 2,972 ms
34,516 KB
testcase_21 AC 2,925 ms
34,388 KB
testcase_22 AC 2,650 ms
27,908 KB
testcase_23 AC 2,811 ms
29,056 KB
testcase_24 AC 30 ms
10,752 KB
testcase_25 AC 91 ms
11,264 KB
testcase_26 AC 52 ms
10,880 KB
testcase_27 AC 46 ms
10,880 KB
testcase_28 AC 547 ms
15,488 KB
testcase_29 AC 281 ms
13,040 KB
testcase_30 AC 96 ms
11,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
'''
	入出力ライブラリ
'''
_allinput = []
for inp in sys.stdin:
	_allinput += inp.strip().split(" ")
def _input():
	for put in _allinput:
		yield put
_obj = _input();
def __input():
	return _obj.__next__()
def nextInt():
	return int(__input())




n = nextInt()
lst = [nextInt() for i in range(0,n)]
K = nextInt()

l,r = 0, 1000000000
for _ in range(60):
	m = (l+r)/2
	if sum([int(i/m) for i in lst]) < K:
		r = m
	else:
		l = m
print(l)
0