結果

問題 No.2227 King Kraken's Attack
ユーザー shobonvipshobonvip
提出日時 2023-02-24 22:06:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 448 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,092 KB
実行使用メモリ 68,804 KB
最終ジャッジ日時 2024-04-10 09:22:06
合計ジャッジ時間 10,189 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,188 KB
testcase_01 AC 38 ms
52,488 KB
testcase_02 AC 38 ms
52,008 KB
testcase_03 AC 55 ms
62,276 KB
testcase_04 AC 39 ms
52,016 KB
testcase_05 AC 37 ms
52,912 KB
testcase_06 AC 50 ms
62,592 KB
testcase_07 AC 45 ms
60,428 KB
testcase_08 AC 50 ms
61,940 KB
testcase_09 AC 47 ms
60,624 KB
testcase_10 AC 44 ms
59,164 KB
testcase_11 AC 49 ms
59,940 KB
testcase_12 AC 52 ms
62,148 KB
testcase_13 AC 49 ms
62,556 KB
testcase_14 AC 254 ms
62,608 KB
testcase_15 AC 254 ms
59,668 KB
testcase_16 AC 249 ms
60,800 KB
testcase_17 AC 379 ms
61,892 KB
testcase_18 AC 305 ms
60,628 KB
testcase_19 AC 292 ms
61,796 KB
testcase_20 AC 375 ms
63,576 KB
testcase_21 AC 412 ms
67,060 KB
testcase_22 AC 231 ms
60,256 KB
testcase_23 AC 64 ms
60,676 KB
testcase_24 AC 195 ms
63,072 KB
testcase_25 AC 291 ms
60,704 KB
testcase_26 AC 259 ms
62,920 KB
testcase_27 AC 287 ms
60,236 KB
testcase_28 AC 422 ms
67,216 KB
testcase_29 AC 402 ms
66,320 KB
testcase_30 AC 448 ms
66,844 KB
testcase_31 AC 389 ms
66,508 KB
testcase_32 AC 232 ms
64,352 KB
testcase_33 AC 201 ms
68,804 KB
testcase_34 AC 156 ms
65,320 KB
testcase_35 AC 236 ms
67,356 KB
testcase_36 AC 236 ms
63,748 KB
testcase_37 AC 155 ms
60,560 KB
testcase_38 AC 116 ms
59,920 KB
testcase_39 AC 104 ms
60,932 KB
testcase_40 AC 111 ms
60,300 KB
testcase_41 AC 351 ms
60,004 KB
testcase_42 AC 107 ms
60,472 KB
testcase_43 AC 171 ms
60,564 KB
testcase_44 AC 300 ms
61,704 KB
testcase_45 AC 39 ms
53,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w,la,lb,ka,kb = map(int,input().split())
ans = h + w
for i in range(h + w + 1):
	x = min(h, la * i)
	suki = h + w
	kirai = -1
	while suki - kirai > 1:
		targ = (suki + kirai) // 2
		y = min(w, lb * targ)
		if h * w - x * y <= ka * i + kb * targ:
			suki = targ
		else:
			kirai = targ
	ans = min(ans, i + suki)
print(ans)
0