結果

問題 No.2227 King Kraken's Attack
ユーザー AngrySadEightAngrySadEight
提出日時 2022-11-02 00:47:18
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 480 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 66,568 KB
最終ジャッジ日時 2024-04-10 09:14:21
合計ジャッジ時間 6,577 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,140 KB
testcase_01 AC 33 ms
52,136 KB
testcase_02 AC 34 ms
53,536 KB
testcase_03 AC 44 ms
62,160 KB
testcase_04 AC 33 ms
52,560 KB
testcase_05 AC 33 ms
53,176 KB
testcase_06 AC 42 ms
61,360 KB
testcase_07 AC 44 ms
61,744 KB
testcase_08 AC 41 ms
59,504 KB
testcase_09 AC 43 ms
61,456 KB
testcase_10 AC 38 ms
59,780 KB
testcase_11 AC 43 ms
61,960 KB
testcase_12 AC 45 ms
62,536 KB
testcase_13 AC 49 ms
64,176 KB
testcase_14 AC 154 ms
60,996 KB
testcase_15 AC 154 ms
60,776 KB
testcase_16 AC 284 ms
58,912 KB
testcase_17 AC 225 ms
60,320 KB
testcase_18 AC 136 ms
60,260 KB
testcase_19 AC 162 ms
62,368 KB
testcase_20 AC 198 ms
63,728 KB
testcase_21 AC 206 ms
65,452 KB
testcase_22 AC 35 ms
52,340 KB
testcase_23 AC 35 ms
52,472 KB
testcase_24 AC 151 ms
62,004 KB
testcase_25 AC 207 ms
60,544 KB
testcase_26 AC 187 ms
60,628 KB
testcase_27 AC 166 ms
60,068 KB
testcase_28 AC 208 ms
66,568 KB
testcase_29 AC 209 ms
65,120 KB
testcase_30 AC 166 ms
65,808 KB
testcase_31 AC 207 ms
66,200 KB
testcase_32 AC 181 ms
65,696 KB
testcase_33 AC 133 ms
66,056 KB
testcase_34 AC 94 ms
65,380 KB
testcase_35 AC 177 ms
66,400 KB
testcase_36 AC 109 ms
63,740 KB
testcase_37 AC 69 ms
61,252 KB
testcase_38 AC 77 ms
61,804 KB
testcase_39 AC 85 ms
61,620 KB
testcase_40 AC 73 ms
61,652 KB
testcase_41 AC 175 ms
61,820 KB
testcase_42 AC 67 ms
61,368 KB
testcase_43 AC 74 ms
60,008 KB
testcase_44 AC 155 ms
60,900 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W, LA, LB, KA, KB = map(int, input().split())
ans = H + W + 1
for i in range(H + 1):
    tate = min(H, LA * i)
    ka_sum = KA * i
    left = -1
    right = W + 1
    while right - left > 1:
        center = (left + right) // 2
        yoko = min(W, LB * center)
        kb_sum = KB * center
        if ka_sum + kb_sum >= H * W - tate * yoko:
            right = center
        else:
            left = center
    if right != W + 1:
        ans = min(ans, i + right)
print(ans)
0