結果

問題 No.825 賢いお買い物
ユーザー yomo3
提出日時 2020-02-18 10:38:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-06 15:25:19
合計ジャッジ時間 1,473 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

INF = 1001001001

A, B, C = map(int, input().split())

budget = A + 10 * B
mi = INF
for a in range(C+1):
    b = C - a
    bought = budget - (a + 10 * b)
    if bought > 0:
        mi = min(mi, bought)

print('Impossible' if mi == INF else mi)
0