結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー ytftytft
提出日時 2022-11-07 10:09:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 203 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 1,192 ms
コンパイル使用メモリ 86,552 KB
実行使用メモリ 107,228 KB
最終ジャッジ日時 2023-09-28 00:10:25
合計ジャッジ時間 8,251 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
99,700 KB
testcase_01 AC 69 ms
75,980 KB
testcase_02 AC 115 ms
87,536 KB
testcase_03 AC 161 ms
99,168 KB
testcase_04 AC 195 ms
107,144 KB
testcase_05 AC 196 ms
107,072 KB
testcase_06 AC 193 ms
107,092 KB
testcase_07 AC 200 ms
100,432 KB
testcase_08 AC 199 ms
100,404 KB
testcase_09 AC 203 ms
100,556 KB
testcase_10 AC 184 ms
103,448 KB
testcase_11 AC 193 ms
106,624 KB
testcase_12 AC 178 ms
103,176 KB
testcase_13 AC 189 ms
99,864 KB
testcase_14 AC 194 ms
100,268 KB
testcase_15 AC 182 ms
104,208 KB
testcase_16 AC 193 ms
107,228 KB
testcase_17 AC 198 ms
107,208 KB
testcase_18 AC 196 ms
107,048 KB
testcase_19 AC 199 ms
100,032 KB
testcase_20 AC 200 ms
100,300 KB
testcase_21 AC 202 ms
100,456 KB
testcase_22 AC 181 ms
103,364 KB
testcase_23 AC 194 ms
107,072 KB
testcase_24 AC 63 ms
71,180 KB
testcase_25 AC 71 ms
76,348 KB
testcase_26 AC 70 ms
76,408 KB
testcase_27 AC 63 ms
76,156 KB
testcase_28 AC 87 ms
79,844 KB
testcase_29 AC 76 ms
76,928 KB
testcase_30 AC 70 ms
76,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda:sys.stdin.readline().rstrip()
N=int(input())
L=list(map(int,input().split()))
K=int(input())
m=[0.0,float(max(L))]
for j in range(70):
	mid=sum(m)/2
	count=0
	for i in L:
		count+=int(i/mid)
	m[K>count]=mid
print(m[1])
0