結果
問題 | No.825 賢いお買い物 |
ユーザー |
![]() |
提出日時 | 2019-05-03 22:48:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-31 18:47:35 |
合計ジャッジ時間 | 1,729 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
A, B, C = [int(i) for i in input().split()] mi = 1e10 for a in range(A + 10 * B + 1): for b in range(B + A // 10 + 1): if a + b == C and a + 10 * b <= A + 10 * B and a - A < 10: mi = min(mi, A - a + 10 * (B - b)) if mi > 1e9 or mi <= 0: print("Impossible") else: print(mi)