結果

問題 No.2227 King Kraken's Attack
ユーザー ntudantuda
提出日時 2023-02-25 22:37:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 65,120 KB
最終ジャッジ日時 2024-04-10 09:46:22
合計ジャッジ時間 4,013 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,340 KB
testcase_01 AC 33 ms
52,484 KB
testcase_02 AC 32 ms
52,276 KB
testcase_03 AC 40 ms
61,792 KB
testcase_04 AC 33 ms
52,696 KB
testcase_05 AC 33 ms
53,344 KB
testcase_06 AC 39 ms
60,104 KB
testcase_07 AC 33 ms
52,248 KB
testcase_08 AC 43 ms
59,980 KB
testcase_09 AC 46 ms
62,012 KB
testcase_10 AC 35 ms
52,164 KB
testcase_11 AC 41 ms
61,448 KB
testcase_12 AC 41 ms
60,808 KB
testcase_13 AC 45 ms
60,704 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 110 ms
60,292 KB
testcase_18 AC 33 ms
52,288 KB
testcase_19 AC 40 ms
61,036 KB
testcase_20 AC 41 ms
60,552 KB
testcase_21 AC 69 ms
63,388 KB
testcase_22 AC 32 ms
52,760 KB
testcase_23 AC 33 ms
52,268 KB
testcase_24 AC 79 ms
60,156 KB
testcase_25 AC 34 ms
52,348 KB
testcase_26 AC 169 ms
61,112 KB
testcase_27 AC 32 ms
53,688 KB
testcase_28 AC 51 ms
62,768 KB
testcase_29 AC 48 ms
63,108 KB
testcase_30 AC 48 ms
65,120 KB
testcase_31 AC 52 ms
62,388 KB
testcase_32 AC 44 ms
60,368 KB
testcase_33 AC 47 ms
63,512 KB
testcase_34 AC 45 ms
62,664 KB
testcase_35 AC 48 ms
62,380 KB
testcase_36 AC 44 ms
61,664 KB
testcase_37 AC 34 ms
52,772 KB
testcase_38 AC 34 ms
52,688 KB
testcase_39 AC 32 ms
52,640 KB
testcase_40 AC 32 ms
51,880 KB
testcase_41 AC 33 ms
52,680 KB
testcase_42 AC 33 ms
52,932 KB
testcase_43 AC 33 ms
52,212 KB
testcase_44 AC 32 ms
52,024 KB
testcase_45 AC 33 ms
52,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W,LA,LB,KA,KB = map(int,input().split())
HW = H * W
ans = 10 ** 7
tmp = 10 ** 7
for i in range(10**6):
    lb = -1
    hb = 10 ** 6
    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 == 10 ** 6:
        continue
    if ans >= i + hb:
        ans = i + hb
        #print(i,hb,i+hb)
    else:
        break

print(ans)

0