結果
| 問題 |
No.176 2種類の切手
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-05-06 20:33:21 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 1,000 ms |
| コード長 | 236 bytes |
| コンパイル時間 | 216 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-08 03:20:29 |
| 合計ジャッジ時間 | 1,698 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
A,B,T=map(int,raw_input().split())
ans=B*((T+B-1)/B)
n_b=0
while True:
ans=min(ans,n_b*B+((T-n_b*B+A-1)/A)*A)
n_b+=1
if n_b>=A:
break
if n_b*B>=T:
break
#print n_b,n_b*B+((T-n_b*B+A-1)/A)*A
print ans
yaoshimax