結果

問題 No.2227 King Kraken's Attack
ユーザー norikamenorikame
提出日時 2023-01-19 01:59:58
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 436 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 82,528 KB
実行使用メモリ 62,964 KB
最終ジャッジ日時 2024-04-10 09:15:02
合計ジャッジ時間 3,523 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,268 KB
testcase_01 AC 37 ms
53,240 KB
testcase_02 AC 38 ms
52,492 KB
testcase_03 AC 38 ms
52,312 KB
testcase_04 AC 38 ms
51,944 KB
testcase_05 AC 38 ms
53,292 KB
testcase_06 AC 40 ms
52,628 KB
testcase_07 AC 38 ms
53,008 KB
testcase_08 AC 39 ms
52,272 KB
testcase_09 AC 41 ms
55,064 KB
testcase_10 AC 40 ms
52,852 KB
testcase_11 AC 38 ms
52,628 KB
testcase_12 AC 37 ms
53,084 KB
testcase_13 AC 38 ms
53,072 KB
testcase_14 AC 45 ms
58,824 KB
testcase_15 AC 37 ms
53,728 KB
testcase_16 AC 45 ms
59,408 KB
testcase_17 AC 71 ms
62,964 KB
testcase_18 AC 52 ms
60,304 KB
testcase_19 AC 41 ms
58,912 KB
testcase_20 AC 42 ms
59,236 KB
testcase_21 AC 44 ms
58,616 KB
testcase_22 AC 43 ms
58,604 KB
testcase_23 AC 43 ms
59,324 KB
testcase_24 AC 45 ms
59,104 KB
testcase_25 AC 57 ms
59,620 KB
testcase_26 AC 47 ms
58,296 KB
testcase_27 AC 47 ms
59,240 KB
testcase_28 AC 43 ms
59,048 KB
testcase_29 AC 43 ms
58,488 KB
testcase_30 AC 47 ms
61,192 KB
testcase_31 AC 43 ms
58,660 KB
testcase_32 AC 43 ms
58,564 KB
testcase_33 AC 42 ms
59,228 KB
testcase_34 AC 43 ms
58,900 KB
testcase_35 AC 44 ms
58,748 KB
testcase_36 AC 43 ms
58,232 KB
testcase_37 AC 38 ms
52,156 KB
testcase_38 AC 38 ms
53,188 KB
testcase_39 AC 38 ms
52,556 KB
testcase_40 AC 39 ms
52,920 KB
testcase_41 AC 38 ms
52,560 KB
testcase_42 AC 39 ms
52,616 KB
testcase_43 AC 40 ms
53,016 KB
testcase_44 AC 38 ms
52,500 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 

INF = (int)(1e9)
h, w, la, lb, ka, kb = map(int, input().split())
amx, bmx = (h+la-1) // la, (w+lb-1) // lb
bcnt, res = bmx + 1, INF

for acnt in range(amx+1):
    alen = min(h, acnt*la)
    adda = acnt * ka
    while bcnt > 0:
        blen = min(w, (bcnt-1)*lb)
        addb = (bcnt-1) * kb
        if alen*blen+adda+addb < h*w:
            break
        bcnt -= 1
    if bcnt <= bmx:
        res = min(res, acnt+bcnt)

print(res)
0