結果

問題 No.2227 King Kraken's Attack
ユーザー ntudantuda
提出日時 2023-02-26 12:11:52
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 490 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 64,400 KB
最終ジャッジ日時 2024-04-10 09:48:08
合計ジャッジ時間 4,498 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,180 KB
testcase_01 AC 34 ms
52,884 KB
testcase_02 AC 35 ms
52,744 KB
testcase_03 AC 41 ms
59,288 KB
testcase_04 AC 35 ms
52,548 KB
testcase_05 AC 35 ms
53,408 KB
testcase_06 AC 44 ms
60,912 KB
testcase_07 AC 35 ms
52,988 KB
testcase_08 AC 44 ms
60,712 KB
testcase_09 AC 45 ms
60,720 KB
testcase_10 AC 35 ms
52,752 KB
testcase_11 AC 37 ms
52,628 KB
testcase_12 AC 40 ms
58,740 KB
testcase_13 AC 44 ms
60,720 KB
testcase_14 AC 198 ms
61,184 KB
testcase_15 AC 36 ms
53,228 KB
testcase_16 AC 191 ms
60,088 KB
testcase_17 AC 121 ms
60,216 KB
testcase_18 AC 34 ms
52,348 KB
testcase_19 AC 45 ms
59,972 KB
testcase_20 AC 45 ms
59,760 KB
testcase_21 AC 77 ms
62,620 KB
testcase_22 AC 35 ms
52,136 KB
testcase_23 AC 35 ms
52,332 KB
testcase_24 AC 75 ms
60,476 KB
testcase_25 AC 35 ms
52,204 KB
testcase_26 AC 190 ms
60,448 KB
testcase_27 AC 36 ms
52,180 KB
testcase_28 AC 59 ms
64,400 KB
testcase_29 AC 50 ms
62,132 KB
testcase_30 AC 53 ms
64,288 KB
testcase_31 AC 58 ms
62,560 KB
testcase_32 AC 49 ms
62,216 KB
testcase_33 AC 51 ms
61,904 KB
testcase_34 AC 49 ms
62,400 KB
testcase_35 AC 51 ms
62,008 KB
testcase_36 AC 47 ms
62,756 KB
testcase_37 AC 35 ms
52,920 KB
testcase_38 AC 35 ms
53,304 KB
testcase_39 AC 36 ms
52,500 KB
testcase_40 AC 35 ms
52,472 KB
testcase_41 AC 35 ms
53,584 KB
testcase_42 AC 37 ms
53,060 KB
testcase_43 AC 34 ms
53,104 KB
testcase_44 AC 35 ms
51,888 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W,LA,LB,KA,KB = map(int,input().split())
HW = H * W
ans = 10 ** 7
tmp = 10 ** 7
for i in range(H+1):
    lb = -1
    hb = W + 1
    while hb - lb > 1:
        mid = (lb + hb) // 2
        tmp = min(H,LA*i) * min(W,LB*mid) + KA * i + KB * mid
        if tmp >= HW:
            hb = mid
        else:
            lb = mid
        #print(i,hb,tmp)
    if hb == W + 1:
        continue
    if ans >= i + hb:
        ans = i + hb
        #print(i,hb,i+hb)
    else:
        break

print(ans)

0