結果

問題 No.2099 [Cherry Alpha B] Time Machine
ユーザー 👑 H20H20
提出日時 2022-10-14 23:17:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 580 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 76,980 KB
最終ジャッジ日時 2023-09-08 23:39:12
合計ジャッジ時間 25,578 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 159 ms
75,740 KB
testcase_01 AC 161 ms
75,744 KB
testcase_02 AC 159 ms
75,772 KB
testcase_03 WA -
testcase_04 AC 103 ms
75,632 KB
testcase_05 AC 149 ms
75,676 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 163 ms
76,000 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 104 ms
75,556 KB
testcase_15 AC 151 ms
75,740 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 166 ms
75,752 KB
testcase_19 AC 166 ms
75,780 KB
testcase_20 AC 166 ms
75,880 KB
testcase_21 AC 169 ms
75,964 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 165 ms
75,836 KB
testcase_25 AC 168 ms
75,876 KB
testcase_26 AC 169 ms
75,880 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 103 ms
75,608 KB
testcase_30 AC 148 ms
75,688 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 103 ms
75,644 KB
testcase_35 AC 149 ms
75,748 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 164 ms
76,004 KB
testcase_39 AC 166 ms
75,976 KB
testcase_40 AC 165 ms
75,892 KB
testcase_41 WA -
testcase_42 AC 166 ms
75,984 KB
testcase_43 AC 164 ms
75,932 KB
testcase_44 AC 165 ms
75,916 KB
testcase_45 AC 166 ms
75,780 KB
testcase_46 WA -
testcase_47 AC 166 ms
75,884 KB
testcase_48 WA -
testcase_49 AC 102 ms
75,452 KB
testcase_50 AC 146 ms
75,732 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 101 ms
75,592 KB
testcase_54 AC 134 ms
75,912 KB
testcase_55 AC 166 ms
75,784 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 AC 192 ms
75,924 KB
testcase_65 AC 188 ms
75,876 KB
testcase_66 AC 189 ms
75,888 KB
testcase_67 AC 191 ms
75,808 KB
testcase_68 WA -
testcase_69 WA -
testcase_70 WA -
testcase_71 AC 215 ms
75,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
X,A = map(int, input().split())
Y,B = map(int, input().split())
ans = 10**20
for y in range(10**7+10):
    day = -y*B
    if T>=day:
        x = (T-day)//A
        ans = min(ans,y*Y+(T-day),y*Y+x*X+abs(T-(y*A-x*B)))
print(ans)

0