結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,884 KB
testcase_01 AC 38 ms
52,976 KB
testcase_02 AC 34 ms
53,032 KB
testcase_03 AC 42 ms
61,284 KB
testcase_04 AC 32 ms
52,008 KB
testcase_05 AC 32 ms
52,496 KB
testcase_06 AC 39 ms
59,784 KB
testcase_07 AC 32 ms
52,888 KB
testcase_08 AC 43 ms
59,728 KB
testcase_09 WA -
testcase_10 AC 37 ms
52,472 KB
testcase_11 AC 43 ms
61,296 KB
testcase_12 AC 43 ms
59,484 KB
testcase_13 AC 46 ms
61,064 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 32 ms
52,120 KB
testcase_19 AC 40 ms
60,156 KB
testcase_20 AC 40 ms
61,244 KB
testcase_21 AC 71 ms
62,460 KB
testcase_22 AC 33 ms
52,124 KB
testcase_23 AC 32 ms
52,856 KB
testcase_24 AC 78 ms
61,000 KB
testcase_25 AC 33 ms
52,404 KB
testcase_26 AC 172 ms
61,308 KB
testcase_27 AC 32 ms
52,628 KB
testcase_28 AC 51 ms
62,780 KB
testcase_29 AC 46 ms
63,780 KB
testcase_30 AC 48 ms
64,200 KB
testcase_31 AC 52 ms
63,132 KB
testcase_32 AC 40 ms
60,232 KB
testcase_33 AC 44 ms
64,132 KB
testcase_34 WA -
testcase_35 AC 48 ms
63,388 KB
testcase_36 AC 43 ms
61,824 KB
testcase_37 AC 32 ms
53,296 KB
testcase_38 AC 32 ms
52,192 KB
testcase_39 AC 32 ms
53,440 KB
testcase_40 AC 31 ms
52,904 KB
testcase_41 AC 31 ms
52,620 KB
testcase_42 AC 31 ms
52,748 KB
testcase_43 AC 31 ms
52,684 KB
testcase_44 AC 31 ms
52,268 KB
testcase_45 AC 32 ms
53,828 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)
    else:
        break

print(ans)

0