結果

問題 No.825 賢いお買い物
ユーザー ohanaohana
提出日時 2023-10-27 13:53:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 275 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 11,760 KB
実行使用メモリ 10,092 KB
最終ジャッジ日時 2023-10-27 13:53:51
合計ジャッジ時間 2,030 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,028 KB
testcase_01 AC 41 ms
10,040 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 33 ms
10,028 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 34 ms
10,028 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 35 ms
10,028 KB
testcase_12 AC 30 ms
10,028 KB
testcase_13 RE -
testcase_14 AC 27 ms
10,028 KB
testcase_15 AC 32 ms
10,028 KB
testcase_16 AC 33 ms
10,028 KB
testcase_17 AC 28 ms
10,028 KB
testcase_18 RE -
testcase_19 AC 29 ms
10,028 KB
testcase_20 AC 28 ms
10,028 KB
testcase_21 AC 27 ms
10,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c = map(int, input().split())

A = []
for i in range(b + 1):
    for j in range(a + 1):
        for k in range(1, i * 10 + j + 1):
            if c == k // 10 + k % 10 + b - i + a - j:
                A.append(i * 10 + j - k)

print(min(A) if min(A) else "Impossible")
0