結果

問題 No.2227 King Kraken's Attack
ユーザー qibqib
提出日時 2023-04-20 21:12:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 70,912 KB
最終ジャッジ日時 2024-04-23 16:06:59
合計ジャッジ時間 3,456 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,224 KB
testcase_01 AC 34 ms
52,096 KB
testcase_02 AC 36 ms
51,840 KB
testcase_03 AC 43 ms
59,776 KB
testcase_04 AC 35 ms
51,840 KB
testcase_05 AC 33 ms
51,584 KB
testcase_06 AC 36 ms
52,708 KB
testcase_07 AC 34 ms
52,864 KB
testcase_08 AC 35 ms
52,352 KB
testcase_09 AC 37 ms
53,376 KB
testcase_10 AC 35 ms
53,248 KB
testcase_11 AC 36 ms
53,376 KB
testcase_12 AC 40 ms
53,376 KB
testcase_13 AC 37 ms
52,992 KB
testcase_14 AC 44 ms
58,752 KB
testcase_15 AC 46 ms
59,392 KB
testcase_16 AC 55 ms
59,392 KB
testcase_17 AC 56 ms
61,824 KB
testcase_18 AC 42 ms
58,624 KB
testcase_19 AC 54 ms
62,208 KB
testcase_20 AC 56 ms
62,336 KB
testcase_21 AC 63 ms
63,104 KB
testcase_22 AC 43 ms
59,136 KB
testcase_23 AC 39 ms
59,392 KB
testcase_24 AC 61 ms
64,256 KB
testcase_25 AC 45 ms
59,136 KB
testcase_26 AC 45 ms
59,008 KB
testcase_27 AC 49 ms
60,160 KB
testcase_28 AC 62 ms
64,128 KB
testcase_29 AC 62 ms
64,000 KB
testcase_30 AC 78 ms
70,912 KB
testcase_31 AC 64 ms
63,872 KB
testcase_32 AC 58 ms
63,104 KB
testcase_33 AC 56 ms
63,744 KB
testcase_34 AC 55 ms
63,488 KB
testcase_35 AC 63 ms
64,256 KB
testcase_36 AC 56 ms
63,104 KB
testcase_37 AC 40 ms
58,880 KB
testcase_38 AC 40 ms
59,008 KB
testcase_39 AC 41 ms
58,880 KB
testcase_40 AC 41 ms
59,264 KB
testcase_41 AC 44 ms
58,880 KB
testcase_42 AC 39 ms
58,752 KB
testcase_43 AC 39 ms
58,880 KB
testcase_44 AC 42 ms
58,880 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w, la, lb, ka, kb = map(int, input().split())

ans = (h + la - 1) // la + (w + lb - 1) // lb
b = 0
for a in range(h, -1, -1):
  while b < w:
    cnt = min(h, a * la) * min(w, b * lb) + a * ka + b * kb
    if cnt >= h * w:
      break
    b += 1
  cnt = min(h, a * la) * min(w, b * lb) + a * ka + b * kb
  if cnt >= h * w:
    ans = min(ans, a + b)

print(ans)
0