結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
75,848 KB
testcase_01 AC 150 ms
75,752 KB
testcase_02 AC 145 ms
75,608 KB
testcase_03 WA -
testcase_04 AC 85 ms
75,764 KB
testcase_05 AC 143 ms
75,856 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 155 ms
75,932 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 87 ms
75,800 KB
testcase_15 AC 143 ms
75,764 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 158 ms
75,828 KB
testcase_19 AC 158 ms
75,992 KB
testcase_20 AC 159 ms
75,900 KB
testcase_21 AC 162 ms
76,040 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 158 ms
75,904 KB
testcase_25 AC 160 ms
75,836 KB
testcase_26 AC 161 ms
76,064 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 85 ms
75,508 KB
testcase_30 AC 141 ms
75,876 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 86 ms
75,612 KB
testcase_35 AC 142 ms
75,860 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 160 ms
75,840 KB
testcase_39 AC 161 ms
75,972 KB
testcase_40 AC 159 ms
75,928 KB
testcase_41 WA -
testcase_42 AC 160 ms
75,920 KB
testcase_43 AC 155 ms
76,024 KB
testcase_44 AC 161 ms
75,780 KB
testcase_45 AC 158 ms
76,044 KB
testcase_46 WA -
testcase_47 AC 160 ms
76,136 KB
testcase_48 WA -
testcase_49 AC 85 ms
75,632 KB
testcase_50 AC 143 ms
75,736 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 88 ms
75,664 KB
testcase_54 AC 124 ms
75,748 KB
testcase_55 AC 147 ms
75,924 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 180 ms
76,084 KB
testcase_65 AC 182 ms
75,980 KB
testcase_66 AC 177 ms
76,020 KB
testcase_67 AC 183 ms
76,020 KB
testcase_68 WA -
testcase_69 WA -
testcase_70 WA -
testcase_71 AC 202 ms
75,864 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):
    before = -T-y*B
    if before<=0:
        x = abs(before)//A
        ans = min(ans,y*Y-before,y*Y+x*X+abs(T-(y*A-x*B)))
print(ans)

0