結果

問題 No.2390 Udon Coupon (Hard)
ユーザー pitPpitP
提出日時 2023-07-22 11:57:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 81,720 KB
実行使用メモリ 61,956 KB
最終ジャッジ日時 2023-10-23 18:15:18
合計ジャッジ時間 7,764 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
59,776 KB
testcase_01 AC 75 ms
59,776 KB
testcase_02 WA -
testcase_03 AC 75 ms
59,776 KB
testcase_04 AC 75 ms
59,776 KB
testcase_05 WA -
testcase_06 AC 72 ms
59,776 KB
testcase_07 AC 61 ms
59,768 KB
testcase_08 AC 61 ms
59,768 KB
testcase_09 AC 76 ms
59,776 KB
testcase_10 AC 75 ms
61,956 KB
testcase_11 AC 65 ms
61,824 KB
testcase_12 AC 64 ms
61,824 KB
testcase_13 AC 64 ms
61,824 KB
testcase_14 AC 72 ms
61,956 KB
testcase_15 AC 63 ms
61,824 KB
testcase_16 AC 75 ms
61,956 KB
testcase_17 AC 64 ms
61,824 KB
testcase_18 AC 66 ms
61,824 KB
testcase_19 AC 68 ms
61,824 KB
testcase_20 AC 60 ms
59,832 KB
testcase_21 AC 60 ms
59,832 KB
testcase_22 AC 76 ms
59,776 KB
testcase_23 AC 75 ms
59,776 KB
testcase_24 AC 71 ms
59,776 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 71 ms
59,776 KB
testcase_29 AC 71 ms
59,776 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 70 ms
59,776 KB
testcase_34 AC 75 ms
59,776 KB
testcase_35 WA -
testcase_36 AC 78 ms
59,776 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 71 ms
59,776 KB
testcase_40 AC 70 ms
59,776 KB
testcase_41 AC 71 ms
59,776 KB
testcase_42 AC 70 ms
59,776 KB
testcase_43 AC 70 ms
59,776 KB
testcase_44 AC 71 ms
59,776 KB
testcase_45 AC 71 ms
59,776 KB
testcase_46 AC 71 ms
59,776 KB
testcase_47 AC 71 ms
59,776 KB
testcase_48 AC 71 ms
59,776 KB
testcase_49 AC 60 ms
59,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
AB = [list(map(int, input().split())) for _ in range(3)]

XAB = [[AB[i][1] / AB[i][0], AB[i][0], AB[i][1]] for i in range(len(AB))]
XAB.sort(reverse=True)

_, Ai, Bi = XAB[0]
_, Aj, Bj = XAB[1]
_, Ak, Bk = XAB[2]

ans = 0
for j in range(2020):
    for k in range(2020):
        i = (N - (Aj * j + Ak * k)) // Ai
        if i >= 0:
            ans = max(ans, Bi * i + Bj * j, Bk * k)
print(ans)
0