結果

問題 No.825 賢いお買い物
ユーザー ohanaohana
提出日時 2023-10-27 13:53:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 275 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 81,812 KB
実行使用メモリ 66,832 KB
最終ジャッジ日時 2023-10-27 13:53:17
合計ジャッジ時間 2,778 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
59,532 KB
testcase_01 AC 60 ms
60,200 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 37 ms
59,984 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 36 ms
59,928 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 38 ms
59,928 KB
testcase_12 AC 36 ms
59,668 KB
testcase_13 RE -
testcase_14 AC 36 ms
59,536 KB
testcase_15 AC 35 ms
59,536 KB
testcase_16 AC 37 ms
59,928 KB
testcase_17 AC 38 ms
59,536 KB
testcase_18 RE -
testcase_19 AC 38 ms
59,536 KB
testcase_20 AC 35 ms
53,504 KB
testcase_21 AC 32 ms
53,504 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