結果

問題 No.176 2種類の切手
ユーザー roaris
提出日時 2019-12-09 14:43:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 58,184 KB
最終ジャッジ日時 2024-06-22 05:22:35
合計ジャッジ時間 2,307 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, T = map(int, input().split())
i = 0
ans = 10**18

while True:
    if i>=A or B*i>T:
        break
    
    j = (T-i*B+A-1)//A
    ans = min(ans, A*j+B*i)
    i += 1

print(ans)
0