結果

問題 No.825 賢いお買い物
ユーザー kohei2019kohei2019
提出日時 2022-04-20 21:39:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 1,573 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 77,284 KB
最終ジャッジ日時 2023-09-02 17:04:34
合計ジャッジ時間 5,045 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
70,964 KB
testcase_01 AC 81 ms
74,948 KB
testcase_02 AC 98 ms
76,636 KB
testcase_03 AC 93 ms
76,444 KB
testcase_04 AC 95 ms
76,540 KB
testcase_05 AC 90 ms
76,244 KB
testcase_06 AC 77 ms
71,180 KB
testcase_07 AC 92 ms
76,420 KB
testcase_08 WA -
testcase_09 AC 87 ms
76,288 KB
testcase_10 AC 97 ms
77,132 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 77 ms
71,412 KB
testcase_14 AC 78 ms
71,236 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 78 ms
71,324 KB
testcase_18 AC 101 ms
77,028 KB
testcase_19 WA -
testcase_20 AC 78 ms
71,112 KB
testcase_21 AC 78 ms
71,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(1,A+B*10+1):
    for j in range(A+1):
        for k in range(B+1):
            if i <= j+k*10:
                rm = (j+k*10)-i
                a = sum(map(int,list(str(rm))))
                if a+(A-j)+(B-k) == C:
                    print(i)
                    exit()
print('Impossible')
0