結果

問題 No.2227 King Kraken's Attack
ユーザー flygonflygon
提出日時 2023-02-24 23:12:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 282 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 72,180 KB
最終ジャッジ日時 2024-04-10 09:37:35
合計ジャッジ時間 5,094 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,024 KB
testcase_01 AC 35 ms
52,600 KB
testcase_02 AC 35 ms
52,068 KB
testcase_03 AC 54 ms
65,704 KB
testcase_04 AC 37 ms
52,052 KB
testcase_05 AC 36 ms
51,940 KB
testcase_06 AC 46 ms
61,432 KB
testcase_07 AC 46 ms
61,728 KB
testcase_08 AC 51 ms
61,604 KB
testcase_09 AC 45 ms
62,084 KB
testcase_10 AC 41 ms
58,916 KB
testcase_11 AC 45 ms
60,832 KB
testcase_12 AC 45 ms
62,324 KB
testcase_13 AC 48 ms
62,412 KB
testcase_14 AC 225 ms
63,860 KB
testcase_15 AC 197 ms
64,012 KB
testcase_16 AC 147 ms
64,884 KB
testcase_17 AC 153 ms
64,136 KB
testcase_18 AC 58 ms
62,436 KB
testcase_19 AC 80 ms
70,676 KB
testcase_20 AC 81 ms
71,208 KB
testcase_21 AC 117 ms
70,548 KB
testcase_22 AC 69 ms
60,968 KB
testcase_23 AC 51 ms
62,652 KB
testcase_24 AC 115 ms
69,208 KB
testcase_25 AC 51 ms
59,844 KB
testcase_26 AC 282 ms
65,924 KB
testcase_27 AC 59 ms
61,692 KB
testcase_28 AC 87 ms
70,368 KB
testcase_29 AC 86 ms
72,180 KB
testcase_30 AC 136 ms
65,984 KB
testcase_31 AC 87 ms
71,396 KB
testcase_32 AC 74 ms
70,728 KB
testcase_33 AC 72 ms
70,108 KB
testcase_34 AC 69 ms
70,096 KB
testcase_35 AC 74 ms
70,864 KB
testcase_36 AC 72 ms
69,116 KB
testcase_37 AC 47 ms
60,904 KB
testcase_38 AC 46 ms
60,196 KB
testcase_39 AC 45 ms
59,932 KB
testcase_40 AC 45 ms
60,516 KB
testcase_41 AC 51 ms
61,228 KB
testcase_42 AC 45 ms
61,036 KB
testcase_43 AC 48 ms
60,224 KB
testcase_44 AC 52 ms
60,656 KB
testcase_45 AC 37 ms
53,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

l = 0
r = h+w
while r-l > 1:
  m = (r+l)//2
  mx = 0
  for a in range(m+1):
    b = m-a
    tmp = min(h,la*a) * min(w,lb*b) + ka*a + kb * b 
    mx = max(mx,tmp)
  if mx >= h*w:
    r = m
  else:
    l = m
print(r)
0