結果
問題 |
No.176 2種類の切手
|
ユーザー |
![]() |
提出日時 | 2017-09-22 16:59:04 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 80,896 KB |
最終ジャッジ日時 | 2024-11-08 10:59:10 |
合計ジャッジ時間 | 3,909 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 1 TLE * 1 -- * 27 |
ソースコード
from math import ceil A,B,T = list(map(int, input().split(' '))) maxa = ceil(T/A) maxb = ceil(T/B) solution = float('inf') for a in range(maxa+1): for b in range(maxb+1): total = b * B + a * A if T <= total: solution = min(solution, total) print(solution)