結果

問題 No.176 2種類の切手
ユーザー titiatitia
提出日時 2022-05-02 00:26:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 1,000 ms
コード長 342 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,332 KB
実行使用メモリ 75,976 KB
最終ジャッジ日時 2023-09-13 17:55:23
合計ジャッジ時間 4,167 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,912 KB
testcase_01 AC 74 ms
75,756 KB
testcase_02 AC 75 ms
75,788 KB
testcase_03 AC 76 ms
75,760 KB
testcase_04 AC 74 ms
75,480 KB
testcase_05 AC 74 ms
75,700 KB
testcase_06 AC 75 ms
75,692 KB
testcase_07 AC 74 ms
75,816 KB
testcase_08 AC 73 ms
75,484 KB
testcase_09 AC 74 ms
75,684 KB
testcase_10 AC 75 ms
75,868 KB
testcase_11 AC 75 ms
75,552 KB
testcase_12 AC 74 ms
75,764 KB
testcase_13 AC 75 ms
75,628 KB
testcase_14 AC 75 ms
75,656 KB
testcase_15 AC 75 ms
75,628 KB
testcase_16 AC 75 ms
75,888 KB
testcase_17 AC 75 ms
75,660 KB
testcase_18 AC 74 ms
75,848 KB
testcase_19 AC 75 ms
75,616 KB
testcase_20 AC 73 ms
75,684 KB
testcase_21 AC 76 ms
75,628 KB
testcase_22 AC 77 ms
75,908 KB
testcase_23 AC 76 ms
75,800 KB
testcase_24 AC 73 ms
75,656 KB
testcase_25 AC 73 ms
75,652 KB
testcase_26 AC 75 ms
75,588 KB
testcase_27 AC 73 ms
75,604 KB
testcase_28 AC 74 ms
75,652 KB
testcase_29 AC 78 ms
75,976 KB
testcase_30 AC 78 ms
75,884 KB
testcase_31 AC 75 ms
75,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# https://atcoder.jp/contests/arc139/tasks/arc139_b
# の類題でした。こっちを先に解いていれば……。

A,B,T=map(int,input().split())
ANS=1<<100

for i in range(10**5):
    if T-A*i>=0:
        j=(T-A*i+B-1)//B
        ANS=min(ANS,A*i+B*j)

    if T-B*i>=0:
        j=(T-B*i+A-1)//A
        ANS=min(ANS,B*i+A*j)

print(ANS)
0