結果

問題 No.825 賢いお買い物
ユーザー akitsugu777
提出日時 2019-06-26 10:22:26
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-24 09:38:14
合計ジャッジ時間 1,644 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

l = []
for i in range(-10, a+1):
    for j in range(-10, b+1):
        if (a-i) + (b-j) == c:
            l.append([i, j])
# print(l)

l2 = []
for i, j in l:
    if i + 10*j > 0:
        l2.append(i + 10*j)
# print(l2)

if len(l2) == 0:
    print('Impossible')
else:
    print(min(l2))
0