結果

問題 No.825 賢いお買い物
ユーザー stng
提出日時 2022-07-09 16:49:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 61,752 KB
最終ジャッジ日時 2024-12-31 04:24:39
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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

okn = a+b*10

for i in range(1,okn):
    for j in range(a+1):
        for k in range(b+1):
            if i <= j+k*10:
                tmp = j+k*10-i
                if tmp%10+tmp//10+a-j+b-k == c:
                    print(i)
                    exit()

    

print("Impossible")
0