結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー superzugansuperzugan
提出日時 2023-09-10 04:04:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,184 ms / 5,000 ms
コード長 257 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 11,140 KB
実行使用メモリ 30,460 KB
最終ジャッジ日時 2023-09-10 04:05:15
合計ジャッジ時間 42,659 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,987 ms
30,084 KB
testcase_01 AC 17 ms
7,836 KB
testcase_02 AC 914 ms
16,712 KB
testcase_03 AC 1,766 ms
24,188 KB
testcase_04 AC 1,717 ms
29,156 KB
testcase_05 AC 1,714 ms
29,056 KB
testcase_06 AC 1,408 ms
29,008 KB
testcase_07 AC 2,439 ms
30,280 KB
testcase_08 AC 2,440 ms
30,460 KB
testcase_09 AC 3,184 ms
30,332 KB
testcase_10 AC 1,554 ms
28,536 KB
testcase_11 AC 1,615 ms
28,152 KB
testcase_12 AC 1,224 ms
26,440 KB
testcase_13 AC 2,230 ms
30,212 KB
testcase_14 AC 2,309 ms
29,212 KB
testcase_15 AC 2,740 ms
27,244 KB
testcase_16 AC 1,277 ms
29,072 KB
testcase_17 AC 1,122 ms
29,036 KB
testcase_18 AC 1,026 ms
29,004 KB
testcase_19 AC 1,134 ms
30,276 KB
testcase_20 AC 1,064 ms
30,324 KB
testcase_21 AC 1,032 ms
30,276 KB
testcase_22 AC 945 ms
28,416 KB
testcase_23 AC 969 ms
28,344 KB
testcase_24 AC 16 ms
7,824 KB
testcase_25 AC 66 ms
8,756 KB
testcase_26 AC 34 ms
8,628 KB
testcase_27 AC 29 ms
7,820 KB
testcase_28 AC 408 ms
11,852 KB
testcase_29 AC 224 ms
10,036 KB
testcase_30 AC 69 ms
8,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
al=list(map(int,input().split()))
k=int(input())
def zen(x):
	ans=0
	for i in al:
		if i>=x:ans+=i//x
	return ans>=k
	
ok,ng=0,10**10+1
cut=0
while(ng-ok>=10**-10 and cut<100):
	mid=(ok+ng)/2
	if zen(mid):ok=mid
	else:ng=mid
	cut+=1
print(ok)
0