結果

問題 No.2099 [Cherry Alpha B] Time Machine
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-10-14 22:19:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 1,244 ms
コンパイル使用メモリ 86,868 KB
実行使用メモリ 76,632 KB
最終ジャッジ日時 2023-09-08 22:16:22
合計ジャッジ時間 12,055 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,308 KB
testcase_01 AC 76 ms
71,172 KB
testcase_02 AC 79 ms
75,548 KB
testcase_03 AC 118 ms
75,756 KB
testcase_04 AC 136 ms
75,608 KB
testcase_05 AC 72 ms
71,032 KB
testcase_06 WA -
testcase_07 AC 130 ms
75,892 KB
testcase_08 AC 126 ms
75,616 KB
testcase_09 AC 124 ms
75,568 KB
testcase_10 AC 118 ms
75,496 KB
testcase_11 AC 86 ms
75,800 KB
testcase_12 AC 126 ms
75,680 KB
testcase_13 AC 117 ms
75,776 KB
testcase_14 AC 139 ms
75,688 KB
testcase_15 AC 71 ms
71,320 KB
testcase_16 WA -
testcase_17 AC 128 ms
75,776 KB
testcase_18 AC 126 ms
75,520 KB
testcase_19 AC 114 ms
75,816 KB
testcase_20 AC 89 ms
75,760 KB
testcase_21 AC 110 ms
75,628 KB
testcase_22 AC 129 ms
75,828 KB
testcase_23 AC 91 ms
75,784 KB
testcase_24 AC 135 ms
75,556 KB
testcase_25 AC 88 ms
75,904 KB
testcase_26 AC 128 ms
75,628 KB
testcase_27 AC 91 ms
75,608 KB
testcase_28 AC 116 ms
76,004 KB
testcase_29 AC 136 ms
75,500 KB
testcase_30 AC 73 ms
71,288 KB
testcase_31 WA -
testcase_32 AC 130 ms
75,708 KB
testcase_33 AC 115 ms
75,800 KB
testcase_34 AC 138 ms
75,660 KB
testcase_35 AC 72 ms
71,036 KB
testcase_36 WA -
testcase_37 AC 130 ms
75,728 KB
testcase_38 AC 116 ms
75,788 KB
testcase_39 AC 123 ms
75,692 KB
testcase_40 AC 131 ms
75,708 KB
testcase_41 AC 111 ms
75,724 KB
testcase_42 AC 111 ms
75,460 KB
testcase_43 AC 83 ms
75,556 KB
testcase_44 AC 84 ms
75,464 KB
testcase_45 AC 135 ms
75,640 KB
testcase_46 AC 108 ms
75,612 KB
testcase_47 AC 111 ms
75,752 KB
testcase_48 AC 115 ms
75,760 KB
testcase_49 AC 138 ms
75,500 KB
testcase_50 AC 72 ms
71,232 KB
testcase_51 WA -
testcase_52 AC 129 ms
75,716 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 AC 143 ms
75,652 KB
testcase_57 AC 152 ms
75,664 KB
testcase_58 AC 146 ms
75,888 KB
testcase_59 AC 129 ms
75,684 KB
testcase_60 AC 152 ms
75,560 KB
testcase_61 AC 153 ms
75,584 KB
testcase_62 AC 153 ms
75,716 KB
testcase_63 AC 151 ms
75,768 KB
testcase_64 AC 94 ms
75,536 KB
testcase_65 AC 159 ms
75,760 KB
testcase_66 AC 103 ms
75,572 KB
testcase_67 AC 161 ms
75,860 KB
testcase_68 AC 145 ms
75,636 KB
testcase_69 AC 146 ms
75,584 KB
testcase_70 AC 144 ms
75,692 KB
testcase_71 AC 179 ms
75,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
x,a = map(int,input().split())
y,b = map(int,input().split())
ans = 10**10

for i in range(abs(t)+1):
    now = a*i
    dif = max(now-t,0)
    j = (dif+b-1)//b
    # print(i,now,dif,j,now-j*b)
    now -= j*b
    ans = min(ans,i*x+j*y+t-now)
print(ans)
0