結果

問題 No.2227 King Kraken's Attack
ユーザー qibqib
提出日時 2023-04-20 21:13:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 71,776 KB
最終ジャッジ日時 2024-04-23 16:07:21
合計ジャッジ時間 3,944 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,116 KB
testcase_01 AC 39 ms
52,020 KB
testcase_02 AC 39 ms
53,164 KB
testcase_03 AC 49 ms
60,512 KB
testcase_04 AC 41 ms
52,384 KB
testcase_05 AC 42 ms
51,904 KB
testcase_06 AC 42 ms
53,576 KB
testcase_07 AC 42 ms
54,664 KB
testcase_08 AC 42 ms
53,852 KB
testcase_09 AC 48 ms
54,692 KB
testcase_10 AC 43 ms
54,804 KB
testcase_11 AC 43 ms
54,248 KB
testcase_12 AC 45 ms
54,184 KB
testcase_13 AC 43 ms
53,008 KB
testcase_14 AC 53 ms
59,348 KB
testcase_15 AC 54 ms
59,868 KB
testcase_16 AC 63 ms
60,128 KB
testcase_17 AC 64 ms
62,480 KB
testcase_18 AC 49 ms
59,936 KB
testcase_19 AC 64 ms
62,624 KB
testcase_20 AC 66 ms
64,284 KB
testcase_21 AC 74 ms
64,120 KB
testcase_22 AC 49 ms
59,300 KB
testcase_23 AC 47 ms
59,968 KB
testcase_24 AC 71 ms
65,468 KB
testcase_25 AC 56 ms
59,476 KB
testcase_26 AC 52 ms
61,276 KB
testcase_27 AC 55 ms
61,412 KB
testcase_28 AC 73 ms
65,280 KB
testcase_29 AC 74 ms
65,336 KB
testcase_30 AC 86 ms
71,776 KB
testcase_31 AC 72 ms
64,868 KB
testcase_32 AC 65 ms
64,828 KB
testcase_33 AC 65 ms
64,848 KB
testcase_34 AC 62 ms
65,384 KB
testcase_35 AC 68 ms
64,464 KB
testcase_36 AC 62 ms
64,464 KB
testcase_37 AC 48 ms
58,840 KB
testcase_38 AC 47 ms
58,848 KB
testcase_39 AC 48 ms
59,600 KB
testcase_40 AC 45 ms
58,604 KB
testcase_41 AC 49 ms
59,096 KB
testcase_42 AC 46 ms
59,608 KB
testcase_43 AC 46 ms
59,088 KB
testcase_44 AC 49 ms
60,284 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